Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Convert XML to DBF
Message
From
31/07/2017 16:05:47
 
General information
Forum:
Visual FoxPro
Category:
XML, XSD
Miscellaneous
Thread ID:
01652918
Message ID:
01652943
Views:
48
>Hi,
>
>Is it possible to convert/import an XML file to a DBF file without "knowing" anything about the XML file structure?
>I have a log.xml file that I can see with notepad. But I would rather see it in a DBF format. What VFP code (if exists) I would use to convert this XML to any DBF format (for easier reading)?
>
>TIA

You were already given some advice, on this. XMLTOCURSOR() can read an XML document and populate a cursor with the data, without previous knowledge of the XML structure, but it is limited if your XML goes too deep, or if the data is stored in attributes as well as in the elements' contents. Marco's great reader can create a VFP object from an XML document, and does not have those limitations - but you won't be able to browse, as you want to,

That said, I appreciate the XMLTOCURSOR() capabilities, but you must feed it well. XML may be transformed (and, to some degree, in a very abstract way) to adjust to what XMLTOCURSOR() expects. If the information of the XML document you have in hands is not sensitive, you may upload it here, for inspection.
----------------------------------
António Tavares Lopes
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform