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.
Showing posts with label XJC. Show all posts
Showing posts with label XJC. Show all posts
December 5, 2011
Reusing Generated JAXB Classes
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.
July 29, 2011
JAXB (XJC) and Nested Classes
Recently I came across a complaint on Twitter about how JAXB (XJC) generates deeply nested class structures from XML schemas. In this post I want to first explain why JAXB does this, and second how to easily configure JAXB not to do this.
Subscribe to:
Posts (Atom)