简体   繁体   English

JAXB与Apache XMLBeans

[英]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. 两者都有类似的性能,但即使Apache XMLBeans似乎提供更好的性能,我通常选择JAXB,因为我不想用第三方工具增加我的应用程序的大小。

With Apache XMLBeans you need a small package around 2mb, it's probably easy to learn and well documented. 使用Apache XMLBeans,您需要一个大约2mb的小包,它可能很容易学习并且有很好的文档记录。 Have full support of XSD specification and namespaces, and mapping only via XML Schema Definition (XSD). 完全支持XSD规范和命名空间,并仅通过XML Schema Definition(XSD)进行映射。 It also seems to use deprecated API's. 它似乎也使用了弃用的API。

The architect of XmlBeans wrote about why he chose to build XmlBeans, even though JAXB was the established standard. XmlBeans的架构师写了他选择构建XmlBeans的原因,尽管JAXB是既定的标准。 Take a look at his blog , specifically the problems with jaxb The most compelling advantage was type substitution. 看看他的博客 ,特别是jaxb问题最引人注目的优势是类型替换。

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. 我更喜欢XMLBeans,因为它附带了一个名为“inst2xsd”的方便工具,它允许您从XML实例文档生成XML模式。 JAXB is not able to do this. JAXB无法做到这一点。

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

agree with bruno. 同意布鲁诺。 JAXB is bundled with Java for a reason JAXB与Java捆绑在一起是有原因的

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Apache XmlBeans NullPointerException - Apache XmlBeans NullPointerException JAXB是否提供XMLBeans compileXsd的替代方法? - Does JAXB provide an alternative to XMLBeans compileXsd? 在Apache XmlBeans中编写xsd:type属性 - Write xsd:type attribute in Apache XmlBeans Gradle:MavenPublish 为 Apache XMLBeans 生成 jar - Gradle: MavenPublish for Apache XMLBeans generated jar 使用apache xmlbeans将命名空间定义添加到xml - Adding namespace definition to xml using apache xmlbeans 使用 Apache XMLBeans 在字符串中编码 XML 实体 - Encoding XML entities in string using Apache XMLBeans 架构到代码生成,XMLBeans或JAXB哪个更好? - Which one is better for schema to code generation, XMLBeans or JAXB? java.lang.NoSuchMethodError: org.apache.xmlbeans.XmlOptions.setEntityExpansionLimit(I)Lorg/apache/xmlbeans/XmlOptions - java.lang.NoSuchMethodError: org.apache.xmlbeans.XmlOptions.setEntityExpansionLimit(I)Lorg/apache/xmlbeans/XmlOptions java.lang.NoSuchMethodError:org.apache.xmlbeans.XmlOptions.setSaveAggressiveNamespaces()Lorg / apache / xmlbeans / XmlOptions; - java.lang.NoSuchMethodError: org.apache.xmlbeans.XmlOptions.setSaveAggressiveNamespaces()Lorg/apache/xmlbeans/XmlOptions; XMLBeans 无法加载 SchemaTypeSystem。 无法加载名为 schemaorg_apache_xmlbeans.system 的 class - XMLBeans Cannot load SchemaTypeSystem. Unable to load class with name schemaorg_apache_xmlbeans.system
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM