[XOM-interest] attribute ordering

Steve Loughran steve.loughran at gmail.com
Mon Jan 22 09:48:05 EST 2007

On 22/01/07, Elliotte Harold <elharo at metalab.unc.edu> wrote:
> Steve Loughran wrote:
> > simple question: when I enum attributes of a Xom element, does it come
> > in any fixed order? And if so, is the order formalised and stable, or
> > some implementation detail that may change over time?
> >
> >
> Attribute order is not defined, stable, or reliable. It is also not part
> of the XML infoset. Attribute order in XOM  is probably related to the
> attribute order reported by the underlying SAX parser, but I don't
> promise that; and the SAX order is itself not defined, stable, or reliable.
> Once you've parsed an element, XOM will not change the order of its
> attributes. Attribute 3 of element X is still attribute 3 of element X 5
> minutes later. However, if you reparse the same document a second time
> that attribute may now become attribute 2 or 4.

Thank you!


More information about the XOM-interest mailing list