I have a need to read an XML message and produce output that contains every XPath encountered. I currently have an XQuery that can successfully read through an XML Message and list out a tabular row for each node encountered in order. That Xquery looks like
select cast(t.c.query('fn:local-name(.)') as varchar(100)) as Node_Name
from dbo.my_table cross apply my_xml_column.nodes('//*') t(c)
I'm trying to extend the XQuery above to list out each entire XPath encountered in order (each XPath output row would end with the node from the output produced from my existing XQuery) ... can't seem to get there.
Any help would be appreciated.
View Complete Post