I am storing xml in SQL Server, and then putting it into a document to send across the interweb. One thing I noticed upon recieving this XML document is that the attributes are in alphabetical order. For the most part I understand that this is irrelavent. I would like to know however what is causing this. Is it SQL or org.w3c.dom. I see a lot of people online pointing at org.w3c.dom, but was wondering if thats a standerd feature or if it means somthing was done incorrectly? does org.w3c.dom always alphabitise XML attributes? Is it possible SQL did it? I need to be able to explain why its happinig even if I dont need to change it so that it dosent happen.
John Lark wrote:I need to be able to explain why its happinig.
No, you don't. The XML Recommendation (as it appears you already know) says the order of attributes is meaningless. Given that, there is no need to explain why any particular serializer outputs attributes in the order it outputs them. It suffices to say that they do what they do.
Joined: Feb 08, 2010
Thanks for the quick response, so then I can say confidently this is simply what the org.w3c.dom does?