# JiBX: JiBX Binding Definition |

JiBX Basics Overview Flexibility Performance Clean code News and Status User Comments Sponsors Bugs Getting Started Binding Tutorial A basic binding Binding extras Structure mapping Collections Using mappings Advanced binding Method hooks Custom code Binding Compiler Binding on Load Runtime JiBX Extras Building JiBX Schema Compatibility Mailing Lists FAQ Contributing License Binding Definition Definition details Definition contexts Conversions XML summary <binding> element <include> element <format> element <namespace> element <mapping> element <value> element <structure> element <collection> element Attribute groups Usage API Runtime JavaDocs Subprojects Generator Tools JibxSoap Xsd2Jibx | ### Binding Definition Overview A binding definition is an XML document that defines the rules for converting your Java objects to and from XML. The JiBX binding compiler takes one or more binding definitions as input, along with your actual class files. It compiles the binding definitions into Java byte code that it adds to the class files. Once the class files have been enhanced with this compiled binding definition code, they're ready to work with the JiBX runtime. You can provide as many binding definitions as you want for the same set of classes (or for different classes). The binding compiler automatically generates code for all the bindings you provide. It even reuses added code between bindings, whereever possible. However, each time you marshal or unmarshal an XML document you'll first need to decide which particular binding you're going to use for this document. Each binding is independent of the others, so you can't switch between bindings within a single document.