users@jaxb.java.net

attribute order

From: Vinh Nguyen (vinguye2) <"Vinh>
Date: Thu, 23 Apr 2009 02:06:31 -0700

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"/>
 
Aloha,
-Vinh