Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Newbie question on processing XML file
Message
 
General information
Forum:
Visual FoxPro
Category:
XML, XSD
Miscellaneous
Thread ID:
00854652
Message ID:
00855213
Views:
19
-------------

>>I want to extract values corresponding to different keys in the file.
[...]
But I want to learn the XML DOM functions and thought that someone might suggest a way to do it using XMLAdapter or some other DOM-specific functions.
------------

Do you want a collection of any nodes that have key attributes?

The syntax for that is:

oy= ox.selectNodes("//*[@key]")
? oy.length

Caveat: you can do it more efficiently if you know more about the structure of your document.

Or do you want to get just the valueof the node whose key matches a given value?

The syntax for that is:

oz = ox.selectSingleNode("//*[@key='key2']/@value").text
? oz

>L<
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform