Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Processing an XML file to VFP cursors
Message
General information
Forum:
Visual FoxPro
Category:
XML, XSD
Miscellaneous
Thread ID:
00904549
Message ID:
00909243
Views:
14
Jamie,

Thanks for your reply. Your solution worked. I am trying to take the process a step further and drill down the tree to contacts. There may be many contacts or no contact for each customer.
I am trying to insert an inner loop to check for this below as you will see -
myContacts = myXmlString.SelectNodes( "customers/customer/contact" )
However this looks thru all the nodes as I guess I could expect.
However if I just use
myContacts = myXmlString.SelectNodes( "contact" ) in the inner loop I get no results.

Any suggestions
Thanks
Carmel

** loop through the customer nodes
myCustomers = myXmlString.SelectNodes( "customers/customer" )

for Each oCustomer In myCustomers
tmpName = oCustomer.SelectSingleNode("customer_number")
? tmpName.Text

myContacts = myXmlString.SelectNodes( "customers/customer/contact" )
for Each oContact In myContacts

tmpName = oContact.SelectSingleNode("firstname")
? tmpName.Text

endfor
endfor
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform