• I would recommend reading this article that demonstrates how to iterate over the elements of an XML document. http://www.sqlservercentral.com/articles/XML/62290/[/url]

    The XQuery function "local-name()" can be used to find out the name of an element or attribute.

    .