`
ispring
  • 浏览: 359470 次
  • 性别: Icon_minigender_1
  • 来自: 杭州
社区版块
存档分类
最新评论

XMLBeans Overview

    博客分类:
  • XML
阅读更多
Introduction
XMLBeans is a tool that allows you to access the full power of XML in a Java friendly way. The idea is that you can take advantage of the richness and features of XML and XML Schema and have these features mapped as naturally as possible to the equivalent Java language and typing constructs. XMLBeans uses XML Schema to compile Java interfaces and classes that you can then use to access and modify XML instance data. Using XMLBeans is similar to using any other Java interface/class, you will see things like getFoo or setFoo just as you would expect when working with Java. While a major use of XMLBeans is to access your XML instance data with strongly typed Java classes there are also API's that allow you access to the full XML infoset (XMLBeans keeps XML Infoset fidelity) as well as to allow you to reflect into the XML schema itself through an XML Schema Object model.

For more details on XMLBeans see the XMLBeans Wiki pages or the XMLBeans documentation (the Documentation tab on this website).

What Makes XMLBeans Different
There are at least two major things that make XMLBeans unique from other XML-Java binding options.

Full XML Schema support. XMLBeans fully supports XML Schema and the corresponding java classes provide constructs for all of the major functionality of XML Schema. This is critical since often times you do not have control over the features of XML Schema that you need to work with in Java. Also, XML Schema oriented applications can take full advantage of the power of XML Schema and not have to restrict themselvs to a subset.
Full XML Infoset fidelity.When unmarshalling an XML instance the full XML infoset is kept and is available to the developer. This is critical because because of the subset of XML that is not easily represented in java. For example, order of the elements or comments might be needed in a particular application.
A major objective of XMLBeans has been to be applicable in all non-streaming (in memory) XML programming situations. You should be able to compile your XML Schema into a set of java classes and know that 1) you will be able to use XMLBeans for all of the schemas you encounter (even the warped ones) and 2) that you will be able to get to the XML at whatever level is necessary - and not have to resort to multple tools to do this.

To accomplish this XMLBeans provides three major APIs:

XmlObject The java classes that are generated from an XML Schema are all derived from XmlObject. These provide strongly typed getters and setters for each of the elements within the defined XML. Complex types are in turn XmlObjects. For example getCustomer might return a CustomerType (which is an XmlObject). Simple types turn into simple getters and setters with the correct java type. For example getName might return a String.
XmlCursor From any XmlObject you can get an XmlCursor. This provides efficient, low level access to the XML Infoset. A cursor represents a position in the XML instance. You can move the cursor around the XML instance at any level of granularity you need from individual characters to Tokens.
SchemaType XMLBeans provides a full XML Schema object model that you can use to reflect on the underlying schema meta information. For example, you might want to generate a sample XML instance for an XML schema or perhaps find the enumerations for an element so that you can display them.
All of this was built with performance in mind. Informal benchmarks and user feedback indicate that XMLBeans is extremely fast.

History
XMLBeans was submitted to the Apache Incubator and Apache XML projects by BEA Systems in September 2003. Thanks to the support and guidance of Steven Noels (project sponsor) and Ted Leung (project mentor), XMLBeans successfully graduated from incubation in June 2004 to become a top level project and part of the Apache XML federation. XMLBeans was originally created because of the need seen by developers, in particular David Bau (David's about me post), need for a more XML centric Java binding model that nothing on the market offered. XMLBeans 1.0 has been successfully used as an underlying technology for several products as well as by a growing number of large users including some of the largest companies in the world.

Future
The future of XMLBeans is exciting and you are invited to contribute. XMLBeans Version 1 is a great, stable technology that will continue to improve going forward. Its emphasis on full support for XML Schema and the XML Infoset along with it's performance charactaristics make it a great choice for in-memory XML-Java programming.

A lot of work has been put into XMLBeans 2.0, which was released on 06-30-2005 (see the news page). XMLBeans is actively looking for contributors and committers so, if you are interested, please join in.
分享到:
评论

相关推荐

    xmlbeans-2.6.0.jar即xmlbeans-2.3.0.jar资源

    XMLBeans是Apache软件基金会开发的一个Java库,它允许开发者通过Java API来操作XML文档。XMLBeans的核心理念是将XML Schema转换为Java类,这样就可以直接在Java程序中以对象的形式处理XML数据,无需手动解析XML字符...

    xmlbeans-2.3.0.jar

    XMLBeans 是 Apache 软件基金会的一个开源项目,它提供了一种将 XML 数据与 Java 类进行绑定的方法。在处理 XML 文档时,XMLBeans 提供了一种高效的、类型安全的接口,使得开发者能够以对象的形式操作 XML 内容。...

    xmlbeans-5.0.3-API文档-中文版.zip

    赠送jar包:xmlbeans-5.0.3.jar; 赠送原API文档:xmlbeans-5.0.3-javadoc.jar; 赠送源代码:xmlbeans-5.0.3-sources.jar; 赠送Maven依赖信息文件:xmlbeans-5.0.3.pom; 包含翻译后的API文档:xmlbeans-5.0.3-...

    xmlbeans-3.1.0-API文档-中文版.zip

    赠送jar包:xmlbeans-3.1.0.jar; 赠送原API文档:xmlbeans-3.1.0-javadoc.jar; 赠送源代码:xmlbeans-3.1.0-sources.jar; 赠送Maven依赖信息文件:xmlbeans-3.1.0.pom; 包含翻译后的API文档:xmlbeans-3.1.0-...

    xmlbeans-3.1.0.jar

    xmlbeans-3.1.0.jar包 XMLBeans是一种工具,可让您以Java友好的方式访问XML 的全部功能。 解决 java.lang.NoClassDefFoundError: org/apache/xmlbeans/XmlException异常

    xmlbeans

    XMLBeans是Apache软件基金会开发的一款Java库,它允许开发者直接在Java对象和XML文档之间进行交互。这个库的核心概念是将XML Schema定义转化为Java类,从而使得XML数据能够被Java程序像操作普通对象一样处理。在...

    xmlbeans的jar包

    XMLBeans是Apache软件基金会开发的一个Java库,它提供了一种方式来处理XML文档,通过将XML Schema转换为Java类,使开发者能够以面向对象的方式与XML数据进行交互。这个库包含多个组件,如`jsr173_1.0_api.jar`、`...

    xmlbeans 源码

    XMLBeans是Apache软件基金会开发的一个Java库,它提供了一种高效的方式来处理XML文档,并将XML数据映射到Java对象(POJOs)上。这个库的核心功能在于它能够自动生成Java类,这些类可以直接与XML Schema定义的结构...

    xmlbeans2.6.0

    XMLBeans是Apache软件基金会开发的一个Java库,它允许程序员通过Java API来操作XML文档。在标题"xmlbeans2.6.0"中提到的是XMLBeans的特定版本2.6.0,这通常意味着包含了该版本的所有功能和修复的已知问题。 在描述...

    xmlbeans-2.5.0.jar

    XMLBeans是Apache软件基金会开发的一款Java库,它提供了一种高效的方式来处理XML文档,通过将XML Schema转换为Java类,使得开发人员可以像操作普通Java对象一样操作XML数据。"xmlbeans-2.5.0.jar"是XMLBeans库的一个...

    org.apache.xmlbeans jar包

    Apache XMLBeans是Apache软件基金会开发的一个Java库,主要用于XML数据绑定和XML文档处理。这个库的核心功能是将XML Schema(XSD)转换为Java类,允许开发者通过对象模型与XML数据进行交互,从而简化XML在Java应用...

    xmlbeans-2.6.0.jar

    XMLBeans是一种工具,可让您以Java友好的方式访问XML 的全部功能。 解决 java.lang.NoClassDefFoundError: org/apache/xmlbeans/XmlException异常

    xmlbeans-bin-3.1.0.tgz

    XMLBeans是Apache软件基金会开发的一款Java库,它允许开发者直接在Java对象和XML文档之间进行交互。这个压缩包“xmlbeans-bin-3.1.0.tgz”包含了XMLBeans库的3.1.0版本,提供了Java应用程序处理XML数据的强大工具。 ...

    xmlbeans-2.6.0.zip

    在"xmlbeans-2.6.0.zip"这个压缩包中,包含了XMLBeans库的版本2.6.0,特别是"xmlbeans-2.6.0.jar"这个文件,它是XMLBeans库的主要组成部分,供Java应用程序使用。 XMLBeans的工作原理基于XML Schema,它通过编译XML...

    xmlbeans-2.5.0

    XMLBeans是Apache软件基金会开发的一款Java库,它允许开发者直接在Java对象模型中操作XML文档。这个库的核心理念是将XML Schema(XSD)转换为Java类,使得开发者可以使用面向对象的方式来处理XML数据,而无需直接...

    xmlbeans 2.3.0

    XMLBeans是Apache软件基金会开发的一款Java库,它允许开发者以编程方式访问和操作XML文档,同时将XML数据绑定到Java对象。XMLBeans 2.3.0是该库的一个版本,提供了对XML Schema的全面支持,使开发人员能够直接与符合...

    xmlbeans2.6.0.jar.zip

    XMLBeans是Apache软件基金会开发的一个Java库,它允许开发者通过Java API来操作XML文档,将XML数据绑定到Java对象上,实现XML与Java对象之间的直接交互。XMLBeans 2.6.0是这个库的一个特定版本,包含了一系列的类和...

    xmlbeans-bin-3.1.0.zip

    XMLBeans是Apache软件基金会开发的一个Java库,它允许开发者直接操作XML文档,将XML数据映射为Java对象,实现XML到Java对象的双向绑定。这个压缩包“xmlbeans-bin-3.1.0.zip”包含了XMLBeans库的二进制版本,版本号...

    使用XmlBeans读写xml

    XmlBeans是Apache软件基金会开发的一个Java库,它提供了一种高效、类型安全的方式来处理XML文档。这个库允许开发者将XML Schema直接映射到Java对象,从而可以方便地进行XML的读写操作。在本文中,我们将深入探讨如何...

    xmlbeans-5.0.3-API文档-中英对照版.zip

    赠送jar包:xmlbeans-5.0.3.jar; 赠送原API文档:xmlbeans-5.0.3-javadoc.jar; 赠送源代码:xmlbeans-5.0.3-sources.jar; 赠送Maven依赖信息文件:xmlbeans-5.0.3.pom; 包含翻译后的API文档:xmlbeans-5.0.3-...

Global site tag (gtag.js) - Google Analytics