Best way to import XML Files

Howie howiewz at beonthenet.com
Fri Jun 18 06:50:55 PDT 2004


----- Original Message ----- 
From: "George Simon" <flowersoft at compuserve.com>
To: "Filepro 2 List" <filepro-list at nospam.celestial.com>
Sent: Monday, June 14, 2004 11:26 PM
Subject: Best way to import XML Files


I have to import and process several XML files at a time.
What I'm planning to do now, since I don't know the name of the files, is:
copy *.xml big.xml
and parse the big.xlm file.
Since there are no single-character field and record delimiters, what is the
best way to import this big.xml file?
----------------------------------------------------------------

I use the ">" character as both the record and field delimiters to the
import command.

Then I do:    wk = wk & inp(1) { ">"

Which restores the delimiter.

The code then loops back to the import until the entire file has been read
in.

When I get to end of file the variable wk has the complete file (with the
">" all restored), which I then parse using the INSTR instruction to find
the tags I need.

As each tag is found I shorten the data in wk by eliminating everything in
front of the tag I was looking for.

I hope that this helps, it works fine for my application.

Howie





More information about the Filepro-list mailing list