Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Newbie question on processing XML file
Message
 
 
To
01/12/2003 10:24:18
General information
Forum:
Visual FoxPro
Category:
XML, XSD
Miscellaneous
Thread ID:
00854652
Message ID:
00854684
Views:
29
>Hi Dmitry.
>
>How would I process the following XML file?:
>
>
><?xml version="1.0"?>
><service>
>   <add key="key1" value="value1" />
>   <add key="key2" value="value2" />
></service>
>
>

>
>The easiest way is to use XMLTOCURSOR like so. Assume that the file is called test.xml:
>
>
>XMLTOCURSOR( 'test.xml', 'csrtest', 512 )
>SCAN
> ? Key
>ENDSCAN
>
This works. Thank you very much.

And how would you suggest to handle the XML file if the structure would be more complicated, like:
<?xml version="1.0"?>
<service>
   <location>
      <add key="key1" value="value1" />
      <add key="key2" value="value2" />
   </location>
   <colors>
      <add key="fg" value="black" />
      <add key="bg" value="white" />
   </colors>
</service>
"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