How can get the XML with sorted attributes using XQuery in SQL?
for example for this XML:
Attributes are unordered in XML, so the document is considered the same whichever order the attributes are printed out in. XQuery certainly has no way to change the order of attributes, and I doubt SQL XML does either.