Sort ordering in XML Services

sp_configure option XML Services defines the sp_configure option default xml sort order, which has three distinguishing characteristics:

xmlparse xmlparse returns a parsed representation of the argument document, including an index of the document’s elements and attributes and their values. The parsed representation specifies the default xml sort order as it exists when the document is parsed.

xmlextract xmlextract evaluates XPath queries that compare terms, such as “//book[author='John Doe']”. xmlextract compares the current default xml sort order with the document’s parsed xml sort order. If they are different, xmlextract raises an exception.

xmlextract uses the XML sort order stored in the input XML document, not the current default sort order in the server.

NoteXML Services uses a single default order, the default xml sort order. It does not use both default Unicode xml sort order and default xml sort order.

Modifying the default xml sort order You can modify the default xml sort order with sp_configure.

After you modify default xml sort order, you can reparse previously parsed XML documents, using the Adaptive Server update command. For update see the Reference Manual, Vol. 2, Commands.

update xmldocs
set doc = xmlparse(xmlextract('/', doc))