Description

xml2class provides you with a simple XML parser, which instantiates data structures written in Java following a XML description (and supports storing them again as XML code). It is thought as an aid for programmers, as it won't do all the work for you.

With the support of xml2class you may describe most data structures' data (such as linked lists, binary trees, tables, menu structures, and so on) in easy to modify XML. Following the XML description, it won't be difficult to write the corresponding Java classes. If you've got those classes, the XML2ClassParser will do the reading in and the instantiating of the entire structure - with the given values.

Download

xml2class version 05/08/01
Complete packagexml2class.jar (43 KB)
Class files onlyxml2classC.jar (14 KB)
Source files onlyxml2classS.jar (30 KB)
Package as zip filexml2class.zip (42 KB)
API documentation as zip filex2cAPI.zip (48 KB)

License

This package is distributed under the GNU General Public License from gnu.org. A copy of the GPL is included in all of the above archives (except xml2classC.jar), but can also be read online (18 KB) at this site.

Documentation

The whole xml2class API documentation is available online. Additionally there are an introduction to xml2class and a practical example (they're included in the source code as well).

Sample code

In case you want to see xml2class in some "real life" situations, I offer here some raw, but working code fragments: X2cPrototypes.

Included are a simple, but fully operational String stack, a very basic address database and a quite well developed menu structure for accessing it (both based on XML), a very basic and tiny vocabulary trainer and a puzzle solver (Bewitched puzzle - solved by backtracking). Unfortunately they are not commented, but the code should be quite self-explanatory.

Download the complete source code collection as java archive (jar - 55 KB) or as zip archive (52 KB). You'll get no support on it; but that doesn't mean that you won't get any help at all.

Advantages

xml2class serves for very facilitated data and data structure handling in XML for Java. It may be useful in the following (and some more) situations:

Logo of zeniko's webcreations