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:
00855224
Views:
31
>-------------
>
>>>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

I know the structure of the xml file, since I am the one creating it. What I do is try to put various global settings (similar to .net web.config) in an xml file. (I used to do it with .dbf file).

So I pretty much followed the web.config format and put the values I am trying to get into attributes.

Your examples look Greek to me <g>. Where do I learn about the syntax you use? Is it part of VFP documentation? I want to understand a little more about xml and how to work with them, rather than just copying your code.

Thank you for your help.

>
>>L<
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform