XMLCoDe

A free implementation of an XML COder/DEcoder:
a Java XML serialization/deserialization tool

This package provides tools for easily and automatically serializing/deserializing Java objects to/from XML strings or streams. It provides a way to easily implement an XML persistent object model. It features support for a scheme for accessor methods use, support for an advanced inheritance scheme, native support for array, vector, and hashtable data structures, as well as native support to serialize/deserialize graph structures (cross-referenced objects).

This sofware was initially released (version 0.3) by Sylvain Guerin on picolibre.enst-bretagne.fr/projects/xmlcode/

The version distributed here (version 1.0), has been enhanced with many new powerfull features including:

This new version 1.0 is now been released under Lesser GPL licence by Sylvain Guerin and Agile Birds.

Inquiries & questions to author of this software at Sylvain Guerin.


[Main features] [Doc] [This distribution] [Licensing issues] [Compilation] [Examples] [Installation]


Main features

  • This package provides tools for automatically serializing and deserializing Java objects to/from XML strings and streams. In other words, this package provides a way to easily implement a XML-persistant object model.

  • These operations are processed in a very easy and efficient manner, without need to specify anything else.

  • Any object could be handled by this package, since objects need only implement an empty interface XMLSerializable.

  • To implement this, you need to define a external mapping model, where the mapping between Java world and XML tags should be defined (you should also decide which data you want to serialize, in order to get a consistent model).
    See package documentation and example 1 for more explanations on that process. Soon an 'how-to' documentation.

  • This package supports an advanced object inheritance scheme.
    See example 2 to show those issues.

  • This package supports accessors methods use scheme, which allow you to automatically maintain a consistent object model.
    See examples 1 & 2 to show those issues.

  • Advanced data structures vector and hashtable are natively supported.
    See example 2 to show examples of those data structures.

  • Other custom data structures could be easily supported through use of accessors methods. (NB: those developpements are welcome to enhance the current XMLCoDe version).

  • This package works with/over parser and transformer softwares.
    NOTA: This distribution comes with an implementation of a parser software (JAXP1.1) but you can easily change this for other parsing software.

  • See the detailed review and discussion of/on main features for more informations.


Technical documentation


This distribution

The binary distribution is released as a jar file containing classes defined in fr.enstb.xmlcode package (contains XMLCoder, XMLDecoder and XMLMapping classes).

If your Java environment does not contain DOM-model nor JDOM-model, you might want to use following provided jars crimson.jar (see http://xml.apache.org/crimson/ and http://www.w3.org/DOM/) and jdom-1.0.jar (see http://www.jdom.org/)

To run examples you also may need JUnit library, also available with this software here: junit-3.8.1.jar.

The source distribution contains all the sources. You need JDK to compile it. This source distribution contains also some examples.

The API documentation contains the Javadoc for XMLCoDe.


Licensing issues

XMLCoDe project - A free java implementation of an XML coder/decoder

Copyright (C) 2001-2007 Sylvain Guerin

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA


Compilation

Compilation should be no problem (if you've downloaded the source and got a Java environment !) assuming that your JDK environment contains DOM and JDOM or that those libraries are present in your classpath.

If your Java environment does not contain DOM-model nor JDOM-model, you might want to use following provided jars crimson.jar (see http://xml.apache.org/crimson/ and http://www.w3.org/DOM/) and jdom-1.0.jar (see http://www.jdom.org/)

To run examples you also may need JUnit library, also available with this software here: junit-3.8.1.jar. (See http://www.jdom.org/).


Running examples

There are five examples contained in this distribution. They are located in the src/test/java/examples directory (example1, example2, example3, example4 and example5 directories).

Those examples are packaged as JUnit tests and assume that you've got JUnit library in your JDK environment.


Installation

To use this library, you just have to set you classpath variable in order to include xmlcode-1.0.jar.

If your Java environment does not contain DOM-model nor JDOM-model, don't forget to include following provided jars in your classpath crimson.jar and jdom-1.0.jar

Back to summary

Sylvain Guerin