XMLBeans: BEA gets the message out

XMLBeans: BEA gets the message out

Posted by: Dion Almaer on May 05, 2004 @ 09:05 AM

Apache XMLBeans are certainly a cool technology. Version 2.0 is in the works, and BEA is trying to get the word out on the technology. They released four technical articles on various parts and pieces.

XML Processing with Java Object Technology

Scott Ryan looks at two of the more popular frameworks used to turn XML input into Java objects and Java objects into XML.
Strongly Typed XML in Java with XMLBeans
Cezar Cristian Andrei presents how XML documents can be manipulated in Java applications in a strongly typed fashion.
Leveraging Complex Schema Features in Java the XMLBeans Way
Raj Alagumalai and Raju Subramanian discuss how XMLBeans handles some schema types, how it provides access to the entire XML infoset, and how it provides access to the schema object model.
Using XMLBeans in Web Service Clients and User Interfaces
Steve Hanson shows how to create and use XMLBeans in a Web service client and then leverages their capabilities in an actual client for the Google Web service.


 

XMLBeans 的优点
XMLBeans 面临着传统解析和绑定技术的竞争,如 DOM、SAX、JAXB 和 Castor,但 XMLBeans 有一些独到之处。它们的比较如下:

  • DOM 在内容中生成整个文档的树。如果文档非常大,DOM 就会变得对内存非常敏感,并会显著降低性能。通过增量解组(incremental unmarshalling)并提供 xget 方法来访问内置的模式数据类型,XMLBeans 取得了较好的性能。
  • 与 DOM 相比,SAX 对内存要求不高,但是 SAX 要求开发人员为事件处理程序编写回调方法,而 XMLBeans 则不需要。
  • 与 XMLBeans 类似,JAXB 和 Castor 也都是 XML/Java 绑定技术,但它们都没有提供百分之百的模式支持。XMLBeans 最大的优势之一是几乎百分之百的支持 XML Schema。此外,XMLBeans 还能够访问完整的 XML Infoset,对于强调元素顺序或者注释的应用程序,这一点特别有用。
  • XMLBeans 还提供了解析 XML 实例的即时验证。
  • XMLBeans 包括一些创新的特性,如 XML 游标和对 XQuery 的支持。

你可能感兴趣的:(message)