aspose file tools*
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
 
 
subject: JAXB - Ordering of elements in generated XML
 
Similar Threads
Identifying elements inside choice by JAXB
Handling of elements inside choice by JAXB
Change the order of elements in JAXB
XML to XML using XSLT or other solution
JAXB XPATH API