An audience member asked me if there was a way to be able to determine the element names that exist within the XML stored in a table. His business problem was that he archives XML in a field of a table, and needed to identify whether one row's XML contained a different set of elements than another row's (i.e., if an untyped XML's "schema" changed between versions).
In this article, I demonstrate T-SQL and XQuery syntax that will generate a table structure containing a list of element names (per primary key value). From this point, "traditional" querying can be used to detect changes in the XML's structure between rows.
http://www.jasonfollas.com/wiki/SQLXML_Tricks_ElementNames.ashx