Assuming I have this XML:
<p>
<a>
<b>
<jedi></jedi>
<c>
<jedi></jedi>
</c>
</b>
</a>
<a>
<b>
<jedi></jedi>
<c>
<jedi></jedi>
</c>
</b>
</a>
</p>
and I want to select each first jedi
appearance under <a>
(2 results), regardless of the xml structure beneath <a>
, how do I do this?
When I tried one of the examples below, all the <jedi>
returned
//a//jedi[1]
//jedi[ancestor::a][1]
When I tried using brackets, below, only the very first returned and not each first.
- (//a//jedi)[1]