I've got a multilevel node structure that looks something like this
<node>
<node>
<node id="a1"></node>
<node id="a2"></node>
</node>
<node>
<node id="b1"></node>
<node id="b2"></node>
</node>
<node>
I want to do a search for the first node that matches an id.
I usually use this syntax:
xmldata.*.(@id == "a2")[0]
but it looks like it's not working for multiple nested levels. Is there a way of finding the node without looping through and archiving the content?