xpath - is it possible to do this?
Posted: Mon Sep 12, 2005 6:44 pm
For example in this case:
<bla id = 2>
<A ruolo = 1>
....
</A>
</bla>
<bla id = 10>
<A ruolo = 12>
....
</A>
</bla>
i have to select node whose have attribute ruolo like 1 or 12, i need both nodes. How can i do this?
i made this:
xmlSubTreeNode.SelectNodes("//bla[descendant::*/@Ruolo=1 or /@Ruolo=12]");
But in this case this instruction read only the first condition without read the second (ruolo = 12) if i write AND it try to find a tag with the 2 condition into..and it find nothing..
Does anybody know if i can do this? or is it impossible?
thanks
Fid
<bla id = 2>
<A ruolo = 1>
....
</A>
</bla>
<bla id = 10>
<A ruolo = 12>
....
</A>
</bla>
i have to select node whose have attribute ruolo like 1 or 12, i need both nodes. How can i do this?
i made this:
xmlSubTreeNode.SelectNodes("//bla[descendant::*/@Ruolo=1 or /@Ruolo=12]");
But in this case this instruction read only the first condition without read the second (ruolo = 12) if i write AND it try to find a tag with the 2 condition into..and it find nothing..
Does anybody know if i can do this? or is it impossible?
thanks
Fid