Subject:sorting attributes Author:David Rojas Date:04 Jan 2007 10:08 AM
This is what I get:
Input:
<root>
<e b="bb" y="yy">
<node x="123" a="123"/>
<node x="999" a="999" b="999"/>
</e>
<e z="zz" a="aa"/>
</root>
Output:
<root>
<e b="bb" y="yy">
<node a="123" x="123"/>
<node a="999" b="999" x="999"/>
</e>
<e a="aa" z="zz"/>
</root>
Basically it is only sorting attributes within an element, not elements within a set of siblings.
Thanks.
Subject:sorting attributes Author:Tony Lavinio Date:04 Jan 2007 10:24 AM
If your question is 'why are attributes not in the same order in
which I specified them or in the original document', you might not
be aware that according to the XML specification, the order of
attributes within an element is 'unordered' and that it is not
guaranteed by any XML processing component that the order of attributes
is preserved.