R
roidy
Take the following xml file:-
<Data>
<Fruit>
<Name>Apple</Name>
<Color>Green</Color>
<Value>100</Value>
</Fruit>
<Name>Orange</Name>
<Color>Orange</Color>
<Value>75</Value>
</Fruit>
<Fruit>
<Name>Plum</Name>
<Color>Purple</Color>
</Fruit>
</Data>
Now in code I`m looping through 'Fruit' nodes:-
Dim xpathDoc = New XPathDocument("test.xml")
Dim xmlNav = xpathDoc.CreateNavigator()
Dim xmlNI = xmlNav.Select("/Data/Fruit")
While (xmlNI.MoveNext())
How to get the value of Name node?
How to get the value of Color node?
How to get the value of Value node?
End While
I`ve looked at quite a few examples and none explain how to get the value of
a child node of the current node. Help please.
Rob
<Data>
<Fruit>
<Name>Apple</Name>
<Color>Green</Color>
<Value>100</Value>
</Fruit>
<Name>Orange</Name>
<Color>Orange</Color>
<Value>75</Value>
</Fruit>
<Fruit>
<Name>Plum</Name>
<Color>Purple</Color>
</Fruit>
</Data>
Now in code I`m looping through 'Fruit' nodes:-
Dim xpathDoc = New XPathDocument("test.xml")
Dim xmlNav = xpathDoc.CreateNavigator()
Dim xmlNI = xmlNav.Select("/Data/Fruit")
While (xmlNI.MoveNext())
How to get the value of Name node?
How to get the value of Color node?
How to get the value of Value node?
End While
I`ve looked at quite a few examples and none explain how to get the value of
a child node of the current node. Help please.
Rob