XPath - how to use position() in XMLInput

XPath - how to use position() in XMLInput

Hello folks,
i have come across this file that has no identifier for the <b>Item</b>:

i would like to get the output of this file normalised to:
Item   |Detail1   |Detail2     |Detail3     |Detail4
1 |A | |B |B

where the value of item would be returned by the XPath expression position()
But i am failing to understand how the expression should be entered in the tFileInputXML
this is a similar question to:

and i would very much appreciate assistance with this.
One Star

Re: XPath - how to use position() in XMLInput

This shows an XPath that returns the sequence of the parent node.
count(parent::*/preceding-sibling::*) + 1

However when run in 'Refresh Preview' or in a job the column is empty.
When the job is configured with 'Get Nodes' enabled on the tFileInputXML then the results show that the sequence is being calculated.
e.g. from a different dataset:
| tLogRow_1 |
|key |value |entityid|
|key="jurisdiction" |value="GB" |1.0 |
|key="domicile" |value="UK" |1.0 |
How can the column I call 'entityid', computed from the earlier 'count...' XPath be accessed?
The first two columns of output show the full node value of their attribute, so could potentially be parsed.