IntelliJ IDEA
 
Get IntelliJ IDEA

Generate Java Code from XML Schema

Last modified: 11 October 2024

This topic describes how to get a Java representation of an XML Schema, which involves mapping the elements of the XML Schema to members of a Java class. With IntelliJ IDEA, this transformation can be done using one of the following data binders:

  • JAXB generates classes and groups them in Java packages. A package consists of a Java class name and an ObjectFactory class. The latter is a factory that is used to return instances of a bound Java class.

  • XMLBeans converts an XML Schema into a Java class, compiles it, and places in the specified output jar file.