Forum Discussion

ThomasAu's avatar
ThomasAu
Contributor
15 years ago

Help grabbing contents of a specific node

Hello.

in the following example, I would like to grab the guid of "ABC". can somebody tell me how to do it?


<node1>
<node2>
<guid>11.0</guid>
<name>ABC</name>
<description>ABCdescription</description>
</node2>
<node2>
<guid>12.0</guid>
<name>DEF</name>
<description>DEFdescription</description>
</node2>
</node1>


the following does not work:


//node1/node2[@name="ABC"]/guid

//node1/node2/[@name="ABC"]/guid

//node1/node2/name[@name="ABC"]/guid



Can anyone tell me what I am doing wrong?

Thanks.

17 Replies