This page is no longer maintained — Please continue to the home page at

order of XML attributes

No replies
Joined: 2008-10-31,
User offline. Last seen 3 years 8 weeks ago.


does anyone know why XML attributes get lexicographically ordered by default?

res0: scala.xml.Elem =

res1: scala.xml.Elem =

The problem I have concerns XPaths with only position information. For example, considering

the XPath "./@1" gives me "a='A'", however for

I again retrieve "a='A'" which is wrong. I know that in XML in general the order of attributes does not matter, but in this case it does.

Any suggestions?


Copyright © 2012 École Polytechnique Fédérale de Lausanne (EPFL), Lausanne, Switzerland