Steve's XML Testbed Home Page


This set of pages describes an XML Testbed application written in Java, with its own supporting XML infrastructure, including an XML parser and grove. A key feature of the infrastructure is a 'node type registry', which allows dynamic control over which classes are used for particular types of elements - the element class to represent them, the parser class to parse them, the customizer class to edit them and the view class to display them (using a Swing text editor kit).

The XML Testbed provides means to edit and then parse an XML source - currently going so far as to highlight the portion of the source at which any error occurs. It also allows the parsed document to be viewed in the form of a tree. The Testbed user interface is implemented using Swing. The software has been designed to be as modular as possible, to be divided into a suite of relatively small packages, each with a clear role. Each usage of XML (using the word 'usage' rather than 'application' to avoid a dual meaning of the latter) is placed in its own additional package. Three such usages are included in this release, demonstrating how to build on the basic infrastructure, and also providing some (limited!) usable functionality. These three usages are a nascent XSL engine, XML-based user interface configuration, and a database analyser for generating an XML file of the schema of a database.

Overall Software Structure

Notes on this Release

This is the first public release of the XML Testbed software, although it has been in development since October 1997. It is still undergoing evolution of its structure, but is now deemed to be sufficiently mature and stable to be unleashed. A separate page lists things to be done (defects, omissions, areas for improvement, ideas), but this barely scratches the surface.

Legalities and Download

The XML Testbed software and its documentation ('the software') are copyright (c) 1997, 1998 Stephen Withall. It is hereby made available free of charge to use, copy, modify and distribute, subject to the following conditions. The copyright notices present in the software shall not be removed. The software shall not be distributed in commercial products without the written permission of the author. The software is provided 'as is', without warranty of any kind. In no circumstance will Stephen Withall accept any claim, damages or any other liability arising from use of the software.

Contact the Author

The XML Testbed has been developed by Steve Withall. Steve encourages everyone who downloads the XML Testbed to email him their reactions and experiences - especially bugs, deficiencies and suggestions for improvement - and seeks to work co-operatively with everyone who uses it.


The XML Testbed software is provided as a single zip file. Unzipping creates the following directory hierarchy:

        /classes   - Java class files (this release does not use jar files)
        /config    - Configuration files
        /docs      - Documentation, including javadocs *
        /samples   - A few sample XML files
        /src       - Full source code

* To reduce the size of the download (and it reduces it significantly), the /images subdirectory used by javadoc is included only for the xt package. To properly view the javadocs, this subdirectory must be duplicated for all the other packages. For users running a DOS-based operating system, a DOS bat file is provided to perform this task; from a DOS prompt in the /XmlTestbed directory, run CopyImages.bat.

To run the XML Testbed requires JDK1.1 or above (Steve is currently developing under JDK1.1.6) and Swing 1.0.2 or above. These are the only essentials. To parse using SAX requires the installation of the desired parser(s) and their drivers. (By default, parsing is performed using the parser in the xe package, which is included in this release.)

Apart from the standard Java components (described above), the only external dependencies are in those classes which invoke other XML parsers: xt.xt_SaxEngine requires the standard org.xml.sax classes and interfaces to be present; xt.xt_NxpEngine requires the NXP parser to be present. If you simply wish to run the XML Testbed, these external packages only need to be present if you wish to use them; if you wish to recompile xt, they must be present to compile these two classes.


The contents of the menus and the toolbar and, more importantly, the names of some key classes to use (such as SAX drivers) are specified in a an XML configuration file, /config/xt/xt_XmlTestbed.xml. Simple modifications should be self-explanatory. It is advisable to take a copy of this file before making changes, because errors can lead to the application failing to start up. However, a debug window is displayed during start-up, in which any parse error is reported. If a serious start-up error prevents the main frame from displaying, the application must be terminated by hand (Control-C).

The XML Testbed has an HTML help frame. This has a menu configured in the same way as the main frame, reading its configuration from /config/oh/oh_HtmlHelp.xml. (A toolbar can be added to this frame, too, simply by specifying it in the XML configuration file. It is omitted simply for want of suitable images.) Editing this file allows an arbitrary number of HTML help pages to be directly accessible. Note that adding a help option to the help menus of both the main frame and the help frame requires changes to both XML configuration files.


The XML Testbed is a standard Java application. It requires the /xt-beta-1/classes directory to be specified in the CLASSPATH. It takes no command line parameters, and is invoked by calling:

    java xt.xt_Application

To save the considerable trouble of typing this, run.bat is provided to do it.

(This page was last updated on 16 August 1998.)