Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Preserving XML hierarchy when importing into cursors
Message
 
To
31/05/2005 16:51:23
General information
Forum:
Visual FoxPro
Category:
XML, XSD
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP
Miscellaneous
Thread ID:
01018844
Message ID:
01018877
Views:
7
You can use MSXMLDOM and parse it to a treeview.
>Hi,
>
>I'm having trouble finding a solution to keep the hierarchy of an XML document when parsing. From the MSDN documentation, it seems like I should be using the XMLAdapter.loadXML() function which populates tables in the XMLAdapter object with the data, but doesn't seem to give any indexes or fields that I can then reconstruct the hierarchy with. I have attached the code below:
>
>LOCAL oXMLAdapter as XMLAdapter
>oXMLAdapter = NEWOBJECT('XMLAdapter')
>oXmladapter.RespectNesting = .T.
>oXMLAdapter.LoadXML(lc_incoming_dir + lc_filename,.T.)
>lc_count = oxmladapter.tables.Count
>FOR x=lc_count TO 1 STEP -1
> oxmladapter.tables.Item(x).tocursor
>ENDFOR
>
>There has to be a way to keep the hierarchy of the XML document, but for the life of me cannot find the code to do it. Any help will be much appreciated. Thanks.
Imagination is more important than knowledge
Previous
Reply
Map
View

Click here to load this message in the networking platform