简体   繁体   中英

JAXB vs Apache XMLBeans

任何人都可以告诉我哪个更好(JAXB或Apache XMLBeans)考虑到大于10Mb的文件的性能?

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 around 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 deprecated API's.

The architect of XmlBeans wrote about why he chose to build XmlBeans, even though JAXB was the established standard. Take a look at his blog , specifically the problems with jaxb The most compelling advantage was type substitution.

I prefer XMLBeans, because it comes with a handy tool called "inst2xsd" which allows you to generate an XML schema from an XML instance document. JAXB is not able to do this.

See http://xmlbeans.apache.org/docs/2.0.0/guide/tools.html#inst2xsd

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM