B
baggy
Hi,
I have the following XML:-
<X1>
<Props>
<Prop xsi:type=\"text\" Name=\"N1\"><Value>TestUser</Value></Prop>
<Prop xsi:type=\"bool\" Name=\"flag\"><Value>0</Value></Prop>
<Prop xsi:type=\"int\" Name=\"numemp\"><Value>100</Value></Prop>
</Props>
</X1>
I want to extract just the value for a specific <Prop>, for instance I
want to be able to just retrieve the Value of the "flag" <Prop>.
I am thinking of looping through each node and testing for the Name
attribute but that seems a little complicated. Is there a way to do it
using XPATH?
Any help?
Thanks
I have the following XML:-
<X1>
<Props>
<Prop xsi:type=\"text\" Name=\"N1\"><Value>TestUser</Value></Prop>
<Prop xsi:type=\"bool\" Name=\"flag\"><Value>0</Value></Prop>
<Prop xsi:type=\"int\" Name=\"numemp\"><Value>100</Value></Prop>
</Props>
</X1>
I want to extract just the value for a specific <Prop>, for instance I
want to be able to just retrieve the Value of the "flag" <Prop>.
I am thinking of looping through each node and testing for the Name
attribute but that seems a little complicated. Is there a way to do it
using XPATH?
Any help?
Thanks