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
November 5, 2010
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
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.
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.