I’ve one xml like:-
<SkillMap>
<ExitPoint ID="01">
<NodeName>abcd</NodeName>
</ExitPoint>
<ExitPoint ID="04">
<NodeName>defg</NodeName>
</ExitPoint>
<ExitPoint ID="22">
<NodeName>mnop</NodeName>
</ExitPoint>
</SkillMap>
I am trying to get the value of the <ExitPoint> node based on the ID value i.e. if i enter the ID as 01 it should give “abcd” and if 22 it should give “mnop” and so on, but i’m not getting it, tried lot, please help.
Thanks,
Ars
You can do it using Xpath, consider the following example taken from the JAXP Specification 1.4 (which I recommend you to consult for this):