I understand that for the below xml the xpath expression "//span[position()=1]" returns the first span element anywhere in the document:
<div>
<span>qty</span>
<span>price</span>
<span>time</span>
</div>
But when the same expression "//span[position()=1]" is used for the below XML, then it returns all the span elements instead of the first span element
<div>
<b><span>qty</span></b>
<b><span>price</span></b>
<b><span>time</span></b>
</div>
Any help would be appreciated.