The macro \xmlpos{#1} returns the position number of the current node in its parent.However, I would like to know the position number in its parent for the node with the same tag.
An example of what I mean:
<parent>
<somenode></somenode >
<node>inside it \xmlpos{#1} will return 2 but I would like 1>
<somenode></somenode >
<somenode></somenode >
<node>inside it \xmlpos{#1} will return 5 but I would like 2>
</parent>
Can this be accomplished already or does it require a new API?