JAXB (Java Architecture for XML Binding) is a framework to marshal Java objects to XML and vice-versa.
It is part of the JDK and comes with a command-line compiler (
xjc) that creates Java classes from an existing XML-Schema.
The xjc it located at the /bin folder of the JDK:
xjc -d [target folder] -p [package name] [xml-schema file name]
The classes will be written to the folder “src” (relative to the current location) in the package “de.myproject.somepackage”.
The schema file “my-schema.xsd” will be compiled.
xjc -d src -p de.myproject.somepackage my-schema.xsd
For more information see