Paradox Community

Items in pnews.paradox-programming

Subject:Re: Importing XML files using ODBC
Date:7 Aug 2017 16:32:43 -0400
From:"Jim Moseley" <jim@mapson.triptracker.com>
Newsgroups:pnews.paradox-programming

Ian,

>I need to import an XML into a Pdox table.  I do 
>not understand why data from any source is exported to XML - what is the

>advantage of this?  Pity Pdox cant deal with this.

Pdox can easily deal with this.  XML is just a standard data format where
everything is in 'plain text'.  It is typically used to pass data between
different systems.  Basically, it is just a text stream that is in a specific
format.

I have a few posts here on how to read the XML data feed.  Frederic Marand
(sp?) had a great tutorial that was my starting point, though I wasn't able
to get all of his stuff working.  I settled on using the built-in Windows
MSXML function to read from any XML source, be it a SOAP server, Web Services,
or just a stand-alone file on the web.  This gave me a long string of the
entire XML structure (or SOAP envelope, or Web Services data structure, or
whatever you want to call it).  Note that using MSXML takes about 10-20 lines
of code to capture almost any XML stream.

Getting the data is only half the fun.  The other half is deconstructing
this long string of tags & info into a table format that you can use in Paradox.
 I have posted a home-built XML parser in these groups, that will convert
(almost) any XML string into a flat 'relational' format that can easily be
used in Paradox.

Let me know if you have any questions, or need more info on the other posts
I mentioned.

Finally, I'm assuming that you are using a 'pull' scheme - where your system
requests data from some server as needed.  If you have a 'push' scheme, where
the server sends you data whenever it wants, you will need either the CWS
OCX web server, or some sort of messaging (like email?) to receive this,
and then descontruct it as above.

Double-finally, if you want, please post either the host XML site's URL,
or an excerpt of the XML you are receiving, and we can help you understand
this better.

HTH,
Jim Moseley


Copyright © 2004 thedbcommunity.com