-------------
>>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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only