Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Preserving XML hierarchy when importing into cursors
Message
From
31/05/2005 16:51:23
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
XML, XSD
Title:
Preserving XML hierarchy when importing into cursors
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP
Miscellaneous
Thread ID:
01018844
Message ID:
01018844
Views:
44
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.
Next
Reply
Map
View

Click here to load this message in the networking platform