Controlling the order of XML namepaces

前端 未结 6 1164
你的背包
你的背包 2021-01-15 00:26

I\'m having a problem getting the \"xmlns\" to appear first in the root attribute list.

Im getting this:

  

        
6条回答
  •  无人及你
    2021-01-15 01:01

    Attribute ordering is NOT specified in the XML document, and shouldn't be relied upon. It may be worth looking at the spec

    You'll find that if you read a XML document into a DOM, and write it out, regardless of the platform/library, you can't (and shouldn't) rely on the attribute ordering. It's a common misconception, btw!

提交回复
热议问题