tags:

views:

1018

answers:

3

Anyone can tell me which one is better (JAXB or Apache XMLBeans) taking in account the performance for files bigger then 10Mb?

+5  A: 

Both have similar performances, however even if Apache XMLBeans seems to present better performance, I normally choose JAXB because i don't want to increase the size of my applications with 3rd party tools.

With Apache XMLBeans you need a small package arround 2mb, it's probably easy to learn and well documented. Have full support of XSD specification and namespaces, and mapping only via XML Schema Definition (XSD). It also seems to use depricated API’s.

Bruno Simões
I'm trying to create a webstart application so the size of the final application is very important and probably the heaviest factor in my decision since the difference in performance is not too big.
Simon
+1  A: 

agree with bruno. JAXB is bundled with Java for a reason

Nico
Because it was made by cheap Indian labor? :)
Esko
No, because it won the xml-java-object-mapping-tool lottery :)
Nico
While "lottery" doesn't sound like a selection by quality but by luck...
Henning
JAXB is not a tool but a spec (http://jcp.org/en/jsr/detail?id=222). The Metro JAXB impl (https://jaxb.dev.java.net/) is included in Java SE 6. There are other JAXB impls such as MOXy (http://www.eclipse.org/eclipselink/moxy.php) and JaxMe (http://ws.apache.org/jaxme/).
Blaise Doughan
did not know that thanks for the info
Nico
+2  A: 

I prefer XMLBeans, because it comes with a handy tool called "inst2xsd" which allows you to generate a schema from an XML document. JAXB can only compile schemas, not generate them.

dogbane
JAXB 2 can generate XML Schemas, see http://download.oracle.com/docs/cd/E17409_01/javase/6/docs/api/javax/xml/bind/JAXBContext.html#generateSchema(javax.xml.bind.SchemaOutputResolver)
Blaise Doughan