users@jaxb.java.net

Re: other vendors was: jaxb.properties and bgm.ser files in a jar

From: Dennis Sosnoski <dms_at_sosnoski.com>
Date: Mon, 14 Apr 2003 14:09:16 -0700

There's often a reason why options develop, Eric. In the case of data
binding technologies the main issue is that none of the frameworks
available will really fit everyone's needs.

JAXB offers excellent support for code generation from Schema, including
on-demand validation. Of course, if you're not working with a Schema -
or don't want to make the XML Schema the focus of your application -
JAXB can't help you. JAXB is also somewhat bulky and has a
correspondingly high startup cost. This makes it a poor choice for
applications such as loading configuration files.

JiBX (the subject of my article, the first link below) offers high
performance and flexible mapping from XML to Java objects, letting you
decouple your Java code from the XML document structure. The main
downsides to JiBX are that it doesn't directly support validation or
code generation from Schema, and because the binding code is added to
your classes after they're compiled it's awkward to debug the actual
marshalling or unmarshalling process. The lack of Schema code generation
and validation makes JiBX a poor choice for working with complex XML
documents specified by Schemas.

XMLBeans (the subject of the second link) is an interesting approach
that combines some benefits of both the document model and data binding
approaches to working with XML. It's difficult to evaluate this fully
because of the restrictive license and proprietary nature of the code,
but it's likely to be slow for actual data binding use (probably fast to
just read and write a document, but slow to actually work with bound
objects which it handles by a sort of lazy binding approach). If and
when BEA allows me to run performance tests on XMLBeans I'll be able to
give more specific results. XMLBeans could be good for applications
where you only work with a small portion of an XML document - especially
when you want to use XPath selection expressions and such - but for
general data binding purposes JAXB and JiBX are probably better
alternatives.

  - Dennis

Eric Ma wrote:

>I think it is high time for the community to standardize on a single Java XML binding framework. There are just too many options now and makes it difficult to choose the right technology. See http://www-106.ibm.com/developerworks/java/library/x-databd3/index.html, and http://dev2dev.bea.com/technologies/xmlbeans/index.jsp.
>
>
>