Best way to find a position of a node

It sounds like you’re treating the node’s object identity as a reliable way to identify it, which is not a good idea (the same node object may occur multiple times in a document, or it may be replaced with another object that has the same content by a step). Nodes are ‘value types’ — their content is what matters, their object identity shouldn’t be used.

So, given that, you are probably asking the wrong question. If you want to track a node, get its initial position and map that position through transactions.

1 Like