How can I get the position of a node based on a certain attribute value? The following post shows how to do this with elements:
Find position of a node using xpath
So if we change the example xml in the post mentioned above to:
<a>
<b val="zyx" />
<b val="wvu" />
<b val="tsr" />
<b val="qpo" />
</a>
How would I get the position of a/b[@val = 'tsr']?