Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Getting a specific node value
Message
From
27/09/2002 20:50:26
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
XML, XSD
Title:
Getting a specific node value
Miscellaneous
Thread ID:
00705504
Message ID:
00705504
Views:
37
Assuming I have an XML like this:
<Top>
   <Item Name="FirstItem" Value="1"/>
   <Item Name="SecondItem" Value="2"/>
</Top>
How can I proceed to obtain FirstItem value?

I tried the following, which works, but will only give the first item's value:
loXML=CREATEOBJECT('MSXML.DOMDocument')
loXML.LoadXML(FILETOSTR('D:\B.XML'))
loXML.SelectSingleNode('//Top/FirstItem')
? loNode.GetAttribute('Value')
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Next
Reply
Map
View

Click here to load this message in the networking platform