June 30, 2005
30 June 2005 - Apache XMLBeans V2.0.0 Released
The Apache XMLBeans Project is happy to announce the availability of XMLBeans V2.0.0 .
XMLBeans is a tool that allows you to access the full power of XML in a Java friendly way. You can take advantage of all 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 generate 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 to access the full XML infoset (XMLBeans keeps XML Infoset fidelity) as well as to reflect into the XML schema itself through an XML Schema Object Model.
Here's a short list of improvements in this release:
- Improved XQuery/XPath integration - Both XQuery and XPath on XMLBeans are now fully integrated. XPath and XQuery expressions can return other XMLObjects, or they can be executed using an XmlCursor instance, in which case you manipulate the results using a cursor.
- DOM Level II Support - DOM Level II support is now implemented natively so that you can handle the underlying XML in the DOM style. You can switch between DOM, XmlCursor, and XmlObject (either untyped or typed). This improves performance and reduces the memory footprint over Version 1.
- Extensions - You can now add custom functionality to generated XMLBeans. You can pass to the Schema Compiler 1) an interface that defines the set of methods to implement and 2) a static handler that implements this functionality. The generated classes will implement the interface and, for each method, call out to the static handler.
- Improved Error Handling - This version adds error codes and ensures message consistency. In addition, fail-fast behavior is provided for simple types, while access to the post schema validation infoset is made available during validation.
- Performance - Performance has been improved across the board. Native DOM support improves performance and memory footprint; XML parsing is now by default performed by Piccolo, a high performance parser; incremental compilation of only modified artifacts has been added; and the performance of the XmlCursor implementation has been greatly improved.
- JDK 1.5 Generics - Generated classes now optionally take advantage of JDK 1.5 Generics. Note that JDK 1.4 continues to be supported.
- XML Instance/XSD Generation - You can generate a sample XML instance from schema using the xsd2inst tool (which uses the SchemaInstanceGenerator class). You can also generate a schema from an instance using the inst2xsd tool (which uses the Inst2Xsd class).
----
-- The Apache XMLBeans Project
----Posted by Tetsuya Kitahata at June 30, 2005 11:54 PMProject Info -- Apache XMLBeans
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. 1. 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. 2. 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.
Releases can be downloaded from http://www.apache.org/dyn/closer.cgi/xmlbeans/
Project Website http://xmlbeans.apache.org/ Programming Languages Java Categories xml Mailing Lists http://www.mail-archive.com/user%40xmlbeans.apache.org/ Bug/Issue Tracker http://issues.apache.org/jira/secure/BrowseProject.jspa?id=10436 Project Management Committee Apache XML Beans Access to the source code:
Browse http://svn.apache.org/viewcvs.cgi/xmlbeans/trunk/ SVN Direct http://svn.apache.org/repos/asf/xmlbeans/trunk/
http://www.apachenews.org/archives/000665.html
[ Category : Apache XML ] (PDF)(XML)
[ Category : Apache XMLBeans ] (PDF)(XML)

