Hi all,
I need to select a node from an xml file like this:
<ITEM NAME="A">
<PARAM NAME="xxx" VALUE="yyy"/>
</ITEM>
<ITEM NAME="B">
<PARAM NAME="zzz" VALUE="jjj"/>
<PARAM NAME="IS_VALID" VALUE="TRUE"/>
</ITEM>
I need to select all nodes with existing param named "IS_VALID"
I've then try to use this:
(say node is only one <ITEM> node)
node.selectSingleNode("PARAM/@NAME[.='IS_VALID']")
but node is always null...
I've tryed also with /PARAM and //PARAM but nothing changes!!
What I can do?
Thanks all,
DM
Jubz - 30 Mar 2006 11:00 GMT
Maybe this will help:
String xpath = "//ITEM[@PARAM='IS_VALID']";
node.selectSingleNode (xpath);
I didn't test this, but something similar should work.
Denis - 30 Mar 2006 12:00 GMT
Right!
I0ve found an example like ones used by me...
Yours work! Thanks!
DM