users@jaxb.java.net

Re: attribute order

From: Aleksei Valikov <valikov_at_gmx.net>
Date: Thu, 23 Apr 2009 15:37:06 +0200

Hi,

> Is there a way to get JAXB to print attributes in the order they are defined
> in the XSD? Currently, they are printed in reverse.
>
> For example, this is my schema:
> <xs:complexType name="EventType">
> <xs:attribute name="id" type="xs:string" use="required"/>
> <xs:attribute name="trigger" type="xs:string" use="required"/>
> <xs:attribute name="handler" type="xs:string" use="required"/>
> </xs:complexType>
> This is the XML output:
> <event handler="showHelpPage()" trigger="onclick()" id="OnClickEvent"/>

No. Order of attributes is not significant in XML.

Bye.
/lexi