This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
The moose likes EJB and other Java EE Technologies and the fly likes JAXB - Ordering of elements in generated XML Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "JAXB - Ordering of elements in generated XML" Watch "JAXB - Ordering of elements in generated XML" New topic
Author

JAXB - Ordering of elements in generated XML

Sahil Dave
Greenhorn

Joined: Nov 10, 2010
Posts: 11
Hello

I am using JAXB to marshall an object into XML. It looks like JAXB generates the XML with elements in alphabetical order.
Is there a way in which I can restrict the generated XML to have elements in the same order as the XSD?

Thanks


Sahil
Pallav Bora
Ranch Hand

Joined: Oct 13, 2009
Posts: 73
try using "sequence" element
 
GeeCON Prague 2014
 
subject: JAXB - Ordering of elements in generated XML