I have the following XML:
<parent>
<pet>
<data>
<birthday/>
</data>
</pet>
<pet>
<data>
<birthday/>
</data>
</pet>
</parent>
And now I want to select the first birthday element via parent//birthday[1]
but this returns both birthday elements because bothof them are the first child of their parents. How can I only select the first birthday element of the entire document no matter where it is located. I've tried parent//birthday[position()=1]
but that doesn't work either.
Cheers