In this post I will demonstrate how to validate a JAXB object model against an XML schema. This will be done using the javax.xml.validation APIs.
November 24, 2010
Validate a JAXB Object Model With an XML Schema
November 5, 2010
JAXB and Inheritance - MOXy Extension @XmlDescriminatorNode/@XmlDescrimintatorValue
In previous blog posts I described how to leverage the xsi:type attribute and substitution groups to represent inheritance. In this post I'll demonstrate how an upcoming EclipseLink 2.2 JAXB (MOXy) extension can be used to represent inheritance. It leverages an attribute of your own choosing to represent the subtype. If you are using a version of EclipseLink prior to 2.2 you can use the technique described here.
November 4, 2010
JAXB and Inheritance - Using Substitution Groups
In a previous blog post I described how to leverage the xsi:type attribute to represent inheritance. In this post I'll demonstrate how to use the element name instead by leveraging the XML Schema concept of substitution groups.
Labels:
Inheritance,
JAXB,
XmlElementRef,
XmlRootElement
JAXB and Inheritance - Using the xsi:type Attribute
In a previous blog post I was challenged by an Xstream user to describe how JAXB handles inheritance. In this post I'll describe one strategy that can be used, and how easily this can be done with JAXB. I'll discuss alternate strategies in future posts.
Subscribe to:
Posts (Atom)