xjb is a configuration file that is used to customize the default binding behaviour of the JAXB compiler.
The xjb file extension is related to JAXB (Java Architecture for XML Binding) and its binding compiler.
This file allows to customize the JAXB Bindings, when it is needed to modify the default bindings defined through the JAXB compiler. The file contains a set of binding declarations, e.g.:
<jxb:bindings version="1.0"
xmlns:jxb="http://java.sun.com/xml/ns/jaxb"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc"
jxb:extensionBindingPrefixes="xjc">
<jxb:bindings schemaLocation="po4.xsd" node="/xs:schema">
<jxb:globalBindings>
<xjc:superClass name="com.syh.Shape"/>
<xjc:serializable uid="12343"/>
</jxb:globalBindings>
<jxb:bindings node="//xs:element[@name='Widgets']//xs:complexType//xs:choice">
<jxb:property name="Shapes"/>
</jxb:bindings>
</jxb:bindings>
</jxb:bindings>
(this sample comes from O'Reilly onjava.com)
The xjc compiler may be invoked like so:
xjc <schema.xsd> -b <file.jxb>
See also:
- JAXB on SO
- XJC on SO
- The Oracle Java tutorial "Customizing Java Bindings"