Examplotron Beans

An Easy Way to XML-Java Data Binding

Tomáš Pitner

$Id: manual.xml,v 0.7 2003/03/31 23:00:00 tomp Exp $


Table of Contents

About Examplotron Beans
Features
Download
Installation
Running egb examples
Version history

About Examplotron Beans

Examplotron Beans (egb) is an easy to use Java-XML data binding option. There are several reasons why (when and how) to use it:

  1. egb is a good choice in the cases where Examplotron is good as XML schema language

  2. egb gives the possiblility to quickly and easily access your XML data (strongly typed) from within Java programs.

If you want your XML documents to be accessed effectively in your Java programs, use egb.

Features

  • Built on Examplotron - very easy to use XML schema language.

  • Fast runtime - reads (unmarshalls) 11 MB XML file in 2 seconds, writes back in less that 1.4 second (on a 2.5 GHz machine).

  • Lightweight runtime - one two pre-built interfaces and the generated classes are needed (plus a SAX2 parser, not included in the distribution).

  • Easy to use schema language

  • Highly flexible class generation

  • As with Examplotron - 80% of all features are "iconic", very easy to learn and use.

Download

The latest version of egb can always be downloaded from the egb home page.

The distribution egb.zip archive contains:

  • compile-beans.xsl - the EGB compiler itself

  • examples directory

  • tomp/xml/egb directory with compiled utility classes/interfaces

  • compile.bat for recompiling utility classes (not needed)

.

Installation

Actually, egb does not need any complex installation, just perform the following steps:

  1. Download the latest egb from the egb home page.

  2. Unzip the distribution egb.zip archive to a directory of your choice. The best way is to unpack it to an empty directory.

  3. Download and install the SAXON 7.x from SAXON home page at Sourceforge.

  4. SAXON 6.x can also be used. However, in such a case, some minor changes in the compile-beans.xsl must be done: replace all occurences of $eg-uri and $egb-uri in xsl:template match= attribute with their respective URI - The XSLT 1.x processor (such as SAXON 6.x) does not support varname references in xsl:template match= attribute.

  5. After unpacking, put the egb.jar to your CLASSPATH.

    For example, if you installed egb into directory /devel/egb then add the path /devel/egb/egb.jar into the CLASSPATH.

Running egb examples

see tutorial

Version history

see compile-beans.xsl