Welcome to LXB4J, a Java library and API used for light-weight XML binding.
Most Java XML binding solutions work with XSD compilers that create a large number of Java classes
implementing all the XSD types and elements.

The problem is that when working with large schemas, the overhead of managing this large number of classes might be problematic.

LXB4J tries to solve this problem and create an easy to use, lightweight, 100% pure Java binding solution.

How does it work?

LXB4J has a special compiler that reads XSD files and create binary representations of the schemas.
Later you will use this binary representation to marshall (Java -> XML) and unmarshall (XML -> Java) XML
files that were created by the schema.

Note that the original XSD file is not needed on runtime, only the binary format of this file. LXB4J will use
this binary format to make sure that all the elements and attributes are used correctly as stated in the schema.

Above that, LXB4J also has a very simple API to work with Documents and Elements, this API is written above the W3C DOM API
but is simpler and requires less code.


LXB4J is 100% pure Java and is developed over the Java 5.0 platform, so the first thing you have to make sure
is that you have with JDK 1.5!

There is only one jar to use: lxb4j-{version}.jar

Needed third party software:

General design notes

To make things really easy for developers, a BoundedElement in LXB4J can have:

  • Children - ComplexType elements (elements with child elements and / or attributes). Every child is also a BoundedElement.
  • Members - SimpleType elements (elements with #PCDATA content) or attributes.

Note that a simple typed element and an attribute are both considered members, this means that adding or reading simple elements and attributes can be achieved using the same code. LXB4J identifies the member using the schema data provided with the BoundedDocument.

The idea here is that working with simple typed element should be as easy and fast as adding attributes, and the developer should not deal with text nodes and DOM methods for that.

See usage examples on the Short manual page and sample directory provided with the release.

SourceForge.net Logo

LXB4J is hosted on sourceforge.net
Site last updated: 13-dec-05