This page is no longer maintained — Please continue to the home page at www.scala-lang.org

order of XML attributes

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

He,

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

scala>
res0: scala.xml.Elem =

scala>
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?

Cheers,

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