In a previous blog post I wrote about how to map to the choice structure in XML schema when starting from classes. An astute reader tried generating an object model from that schema and noticed that the JAXB implementation generated something different than expected. In this post I'll explain the difference.
Showing posts with label Choice. Show all posts
Showing posts with label Choice. Show all posts
April 15, 2011
XML Schema to Java - XSD Choice
October 21, 2010
JAXB and XSD Choice: @XmlElements
XML Schema has the concept of a choice element. The choice element indicates that one of the elements defined within the choice may occur at this point in the XML document. In this example I will demonstrate how easily this can be mapped using JAXB.
Subscribe to:
Posts (Atom)