A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
EJB and other Java EE Technologies
JAXB - Ordering of elements in generated XML
Joined: Nov 10, 2010
Apr 06, 2011 09:43:38
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?
Joined: Oct 13, 2009
Apr 08, 2011 14:04:16
try using "sequence" element
I agree. Here's the link:
subject: JAXB - Ordering of elements in generated XML
Identifying elements inside choice by JAXB
Change the order of elements in JAXB
XML to XML using XSLT or other solution
Handling of elements inside choice by JAXB
JAXB XPATH API
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2013