<dom4j> The flexible XML framework for Java
 

Introduction

Thank you for downloading DOM4J we hope you find it useful.

DOM4J is an open source framework for processing XML which is integrated with XPath and fully supports DOM, SAX, JAXP and the Java platform such as Java 2 Collections.

 

Building instructions

The build process in DOM4J uses Ant. The prerequisites for running the Ant build system included with this release are that:-

  • You have a JDK installed on your machine such that the java executable is in your PATH

  • You have the JAVA_HOME environment variable defined to point to the directory in which the JDK is installed. For example on Windows this might be C:\jdk1.3 or on Unix it might be /usr/local/jdk1.3.

In the root directory of this distribution there should be a script which runs on most popular operating systems to build a supplied target using Ant. 

Choose the most suitable script for your platform from the scripts below and typing in the command line expression on the right hand side should display a list of available targets in the Ant build system.

Operating System Script Command line
Windows (NT, 2000) build.bat build usage
Unixes (Linux, Solaris etc). build.sh ./build.sh usage

 

Running the example programs

There are a collection of sample programs that come with the DOM4J distribution. To run any of them you should first build the examples using Ant.

Operating System Command line
Windows (NT, 2000) build samples
Unixes (Linux, Solaris etc). ./build.sh samples

Once that is done there is a run script to run a sample program which sets up the CLASSPATH correctly.

Operating System Command line Example
Windows (NT, 2000) run <className> <arguments> run SAXDemo xml\web.xml
Unixes (Linux, Solaris etc). ./run.sh <className> <arguments> ./run.sh SAXDemo xml/web.xml