Showing posts with label XML Schema. Show all posts
Showing posts with label XML Schema. Show all posts

December 5, 2011

Reusing Generated JAXB Classes

In this post I will demonstrate how to leverage the -episode XJC extension to reuse classes previously generated from.an XML schema.  This is useful when an XML schema is imported by other XML schemas and you do not want the same classes generated each time.

October 12, 2011

JAXB (XJC) Imported Schemas and XML Catalogs

XML schema has a power mechanism called "import".  Import allows one XML schema to reference elements and types from another XML schema.  This means you could define types to represent commonly used information once and import these types into other XML schemas. Like any powerful tool, the import mechanism also has the ability to inflict pain.  In this post I'll demonstrate how to leverage an XML catalog to eliminate the pain when using JAXB's XJC tool to generate classes from an XML schema with imports.

December 20, 2010

JAXB and Marshal/Unmarshal Schema Validation

In a previous post I described how to validate an object model (mapped with JAXB annotations) against an XML schema using the javax.xml.validation APIs.  In this post I'll describe how to leverage those APIs during unmarshal and marshal operations.

November 24, 2010

Validate a JAXB Object Model With an XML Schema

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.