• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JAXB - Ordering of elements in generated XML

 
Sahil Dave
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Pallav Bora
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
try using "sequence" element
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic