The Apache License 2.0    
XMLBeans project is a technology for accessing XML by binding it to Java types.





XMLBeans project 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.
· A cursor model through which you can traverse the full XML infoset.
· Support for XML DOM.

Start off with your own stuff:

If you want to get right to it with your own XML schema and instance, follow these basic steps:

Install XMLBeans.

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:

File xmlFile = new File("c:employees.xml");

// Bind the instance to the generated XMLBeans types.
EmployeesDocument empDoc =

// Get and print pieces of the XML instance.
Employees emps = empDoc.getEmployees();
Employee[] empArray = emps.getEmployeeArray();
for (int i = 0; i < empArray.length; i++)

What's New in This Release:

· Updated to the latest XMLSchema.xsd - January 25, 2006
· Updated XmlBeans to work with SaxonB-8.6.1 in place of SaxonB8.1
· XQuery external variable binding support
Last updated on December 22nd, 2009

0 User reviews so far.