Adam Machanic : Uniquely Identifying XML Nodes with DENSE_RANK
I came across this post today from 2009 that solves a problem I have been having with SQL Server XML shredding, and I thought I would pass it along in case anybody else has managed to miss it for as long as I have.
When working with XML in SQL Server, you might want to uniquely identify one node against another. But due to the flexibility with which XML can be defined, this is not always directly possible. SQL Server’s own XML structures are guilty of having this
Source: Adam Machanic : Uniquely Identifying XML Nodes with DENSE_RANK