Sort all attributes of XML in SQL query using XQuery

前端 未结 4 1859
执念已碎
执念已碎 2021-01-18 18:53

How can get the XML with sorted attributes using XQuery in SQL?

for example for this XML:

         


        
4条回答
  •  广开言路
    2021-01-18 19:09

    Although the order of attributes has no semantic significance, one of the design goals of XML is to be human-readable, so it is not entirely unreasonable to try to generate lexical XML in which the order of attributes is consistent and reflects user expectations: for example is easier on the eye than . The Saxon serializer therefore has an option saxon:attribute-order that allows the ordering of attributes in the output XML to be controlled: see http://www.saxonica.com/documentation/index.html#!extensions/output-extras/serialization-parameters

提交回复
热议问题