Overview

X4O is a xml java parser library for development your own xml language. This is preferable done for unmodified POJO objects so external libraries can be wrapped in xml. This is done by defining your own element language definitions in one or more xml files, which in turn are also done by x4o recursively and so it can be extended.

The extension modules are dynamically loaded from the classpath to define the namespaces. Besides the elements in the namespace, modules also define the object parent child relation binding interfaces which results in an object tree.

This all can be used to create your own powerful xml parser and (re)define your own xml language, with using little code and also getting automatic schema generation.

Features

X4O takes a lot of work out of your hand while creating complex languages and still have fine control over the parsing of the xml elements.

For more information visit the detailed list of the Features page.

Usage

Instructions on how to install X4O can be found here and then start your language here.

Examples

There are two examples; SwiXml and JR4O

But at its core the main function of x4o is to translates the xml elements into beans and binds them to an tree. See this example of the FooBean class;

class FooBean {
        private String name=null;
        public void setName(String name) {
                this.name=name;
        }
        public String getName() {
                return name;
        }
}

When using this in xml is looks like;

<my:fooBean test="hello wold"/>

So x4o has created an instance and sets the xml attributes as properties of this bean.