Skip navigation.
Arch2Arch Tab BEA.com
Dev2Dev > Developer Centers > XML

XML

XML is a ubiquitous technology, found in many BEA products. This Dev Center focuses on all aspects of XML. This ranges from tools such as XMLBeans and StAX, through APIs such as XQuery, to its use in implementations such as Liquid Data and WebLogic Integration.

XMLBeans

Apache XMLBeans is a Java-XML binding tool through which you can access the full power of XML in a Java-friendly way. With XMLBeans, you have a familiar and convenient Java object-based view of XML data without losing access to the richness of the original, native XML structure and schema. BEA originated XMLBeans, and in September 2003 donated it to the Apache Software Foundation. XMLBeans will continue to be essential part of WebLogic Platform, providing underlying support for XML processing throughout the platform.

XMLBeans provides three major APIs for access to XML and schema:

  • Strongly-typed access with XmlObject as a base type
    You can compile XML schema to generate Java types. 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.

  • Type-agnostic access through the XmlCursor interface
    From any XmlObject you can get an XmlCursor instance. 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.

  • Access to schema through the SchemaType interface
    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.

XMLBeans fully supports XML schema; classes generated from schema provide constructs for all of the major functionality of XML schema. In addition, XMLBeans preserves the full XML infoset, including the subset of XML that is not easily represented in Java (including element order and comments).

XMLBeans Resources