Welcome to XMLBeans

What is XMLBeans?

XMLBeans is a technology for accessing XML by binding it to Java types. XMLBeans
provides several ways to get at the XML, including:

Through XML schema that has been compiled to generate Java types that represent
schema types. In this way, you can access instances of the schema through
JavaBeans-style accessors after the fashion of "getFoo" and "setFoo".

The XMLBeans API also allows you to reflect into the XML schema itself
through an XML Schema Object model.

Release: Apache XMLBeans 2.6.0 (August 14, 2012)

Few of the improvements in this release (for a more complete list of changes see
CHANGES.txt).

Add new xml option CopyUseNewSynchronizationDomain used for copy. This fixes the scenario when copy and access (ex. selectPath) are used in a multithreading environment.

Entitize \r when not in pretty print, this helps with maintainig \r entities

Update durations to latest spec.

Fix for compiling schema that contains complex type with simple
content that has facets defined in the base simple type

Introducing a default maximum entity replacement limit of 10kb, it can be controled by using the option XmlOptions.setLoadEntityBytesLimit.

Added multiple entry points and refactored code for xsd2inst code.

Many synchronization and stability bug fixes

Note: Starting with XmlBeans 2.6.0, binary files are compatible with JDK1.6. Sources are still compatible with JDK 1.4. When using JDK 1.4, xmlbeans-qname.jar is required on classpath of your application alongside xbean.jar.

Getting Started

Start off with your own stuff.

Compile your schema. Use scomp to compile the schema, generating and jarring Java types. For example, to create a
employeeschema.jar from an employeesschema.xsd file:

scomp -out employeeschema.jar employeeschema.xsd

Write code. With the generated JAR on your classpath, write code to bind an XML instance
to the Java types representing your schema. Here's an example that would use
types generated from an employees schema: