Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Michael C. Butler
  Where is Michael C. Butler?
 Austin
 Texas - United States
 Michael C. Butler
 To: Yuri Rubinov
  Where is Yuri Rubinov?
 Philadelphia
 Pennsylvania - United States
 Yuri Rubinov
 Tags
Subject: RE: Word Doc to XML
Thread ID: 104620 Message ID: 104674 # Views: 2 # Ratings: 0
Version: Visual FoxPro 9 Category: XML
Date: Friday, August 18, 2006 11:28:01 PM         
   


Since there is no known HTML parser, and I was not prepared to write one yet, I decided to convert the file from HTML to XML.
At least that way, I would be able to "find" the data I needed, and export that easily to a text file.
From there, I wrote a routine, that reads through the file, and extracts the data, and builds my cursors.

However, the XML format that Word 2003 converts the to, is totally unrecognizable to anything except Office 2003 applications, ie. Excel / Word, thus the foxpro parser does nothing for me...

I was simply looking for a better way to parse the data, so I do not have soo many errors in my routine that reads it...

I have attached a sample.zip, which includes the original .DOC file, the .XML file, and the output file where I "extracted" the data from the XML.

From that .TXT file, I am working on a routine, to seperate the data, into the correct cursors.

It is a huge project, and I do not expect you to do anything, I was simply looking for ideas.

Thanks...
MB

https://www.foxite.com/uploads/f7693b15-ea86-4741-934e-a8bebe745a9c.zip






> > Yuri,
> >
> > The file starts out in HTML format...even though it has a .DOC extension.
> > I open the file in Word, and convert it to XML.
> > From there, I am trying to import the XML into a cursor, with NO luck.
> >
> > Thanks

>
> Michael,
>
> How do you "convert" it? Setting XML smart tags? What Word version do you have?
> Still, I do not understand why do you need XML file. You could take information from HTML/DOC file, and create the FoxPro cursor from there. So, you may not need XML file at all.
>
> Anyway, the problem (as I know it) is that neither Word nor Foxpro support all the HTM or XML flavors/schemas. FoxPro may not accept/recognize XML files created by another party.
>
> If you wish, send to me the example of HTML file, and also the example of the desirable output cursor structure. It may give me some additional food to think about.
>
>
> Best Wishes,
>
> Yuri Rubinov

ENTIRE THREAD

Word Doc to XML Posted by Michael C. Butler @ 8/18/2006 2:14:20 PM
RE: Word Doc to XML Posted by Yuri Rubinov @ 8/18/2006 3:33:20 PM
RE: Word Doc to XML Posted by Michael C. Butler @ 8/18/2006 5:47:06 PM
RE: Word Doc to XML Posted by Yuri Rubinov @ 8/18/2006 8:56:40 PM
RE: Word Doc to XML Posted by Michael C. Butler @ 8/18/2006 11:28:01 PM
RE: Word Doc to XML Posted by Borislav Borissov @ 8/18/2006 11:42:12 PM
RE: Word Doc to XML Posted by Yuri Rubinov @ 8/19/2006 6:44:53 PM
RE: Word Doc to XML Posted by Steven Holt @ 8/20/2006 2:26:02 AM
RE: Word Doc to XML Posted by Michael C. Butler @ 8/21/2006 5:24:52 PM