Hello,
at the moment as a pragmatic way the JAXB RI is used to bind the xml
schema to the according
Java beans. For me it was basically to save time for Java model changes
after changing the XML
schema. As I agree with the licence issues and possible other issues I'm
+1 for an other library.
This is why I would like to collect some arguments with you and provide
this as a starting point:
JaxMe 2:
++ pro +
o It's a JAXB implementation. This means if JAXB is accepted by the
market it has the
advantages every Java spec has (exchangability, maybe it finds their way
to the J2SE,
tool support, ...).
o In my opinion XML binding in general seems to be very time saving,
type safe and object
oriented (XML schema).
++ con ++
o It seems to be very young. I don't know how stable it is.
Digester:
++ pro ++
o Many users may already have this library as it is part of
Apache commons
o Uses mapping rules.
++ neutral ++
o I'm not sure if it supports XML schema. Which would make it
less type safe and object oriented.
XMLBeans:
++ pro ++
o It is a XML binding library with schema support which I think
is a very important feature. This would also make the development
easier.
o We could make the xml library exchangable.
Quote: "Extensions - You can now add custom functionality to
generated XMLBeans. You can pass to the Schema Compiler 1) an
interface that defines the set of methods to implement and 2)
a static handler that implements this functionality. The
generated classes will implement the interface and, for each
method, call out to the static handler."
I'm not sure if it is too much abstraction for the advantage of
making the xml library exchangable. But we could make the mapping
objects representing the xml tags (e.g. a SubItemMapping class)
implementing an interface. This way the SubItemMapping object
could be filled by Digester, the JAXB RI, XML Beans or whatever
can unmarshall a xml file into a given Java bean structure. It
would make sure that the persistence manager and the node type
registration do not rely on Digester, XML Beans, JaxMe or whatever
library we chose but only on an interface.
BeanUtils:
++ pro ++
o Many users may already have this library as it is part of
Apache commons
++ neutral ++
o Quote: "Consuming XML-based configuration resources (such as
Ant build scripts, web application deployment descriptors,
Tomcat's |server.xml| file)." Sorry, I don't know more about
this feature of BeanUtils.
From all I know at the moment I would tend to XMLBeans but I'm
looking forward to your pro's and con's.
Regards,
Sandro