This site will look much better in a browser that supports web standards, but it is accessible to any browser or Internet device.

The Open Source Zone


JiBX

Project Name JiBX
Category Development tools
Programming Language Java
Project Home Page http://jibx.sourceforge.net/
License(s) BSD License
License URL(s) http://www.opensource.org/licenses/bsd-license.php
Tags (edit) binding, class, data, xml

JiBX is a framework for binding XML data to Java objects. It lets you work with data from XML documents using your own class structures. The JiBX framework handles all the details of converting your data to and from XML based on your instructions. JiBX is designed to perform the translation between internal data structures and XML with very high efficiency, but still allows you a high degree of control over the translation process.

How does it manage this? JiBX uses binding definition documents to define the rules for how your Java objects are converted to or from XML (the binding). At some point after you've compiled your source code into class files you execute the first part of the JiBX framework, the binding compiler. This compiler enhances binary class files produced by the Java compiler, adding code to handle converting instances of the classes to or from XML. After running the binding compiler you can continue the normal steps you take in assembling your application (such as building jar files, etc.; as of Beta 3a you can also skip this as a separate step and instead binding classes directly at runtime, though this approach has some drawbacks).

The second part of the JiBX framework is the binding runtime. The enhanced class files generated by the binding compiler use this runtime component both for actually building objects from an XML input document (called unmarshalling, in data binding terms) and for generating an XML output document from objects (called marshalling). The runtime uses a parser implementing the XMLPull API for handling input documents, but is otherwise self-contained.

This approach gives several important benefits:

  1. Flexibility - Use any class structure you want, so long as you can tell JiBX how to translate it to and from XML.
  2. Clean code - You write the code and JiBX works with it, not the other way around!

To see how JiBX performance stacks up against other Java data binding frameworks check out Data Binding, Part 2: Performance on the IBM developerWorks XML Zone. You can also find out more details of the JiBX framework in Data Binding, Part 3: JiBX Architecture and Data Binding, Part 4: JiBX Usage. Note that the "compact version" of the binding definition mentioned in the latter article is not supported by the current code.

Edit project.

Report abuse.

Similar Projects (edit)

Reviews

Be the first person to review this project!

User tips

Add a tip.

Related books

Title Authors
Java and XML Data Binding Brett McLaughlin

Add more books.


Last modified on 2006-08-21 03:33:27.879 (rel. 2).