Skip to main content


developerWorks  >  XML | Java technology  >

XML programming in Java technology, Part 3

developerWorks

Level: Advanced

Doug Tidwell , XML Evangelist, IBM

16 Jul 2004

Register now or sign in using your IBM ID and password.

This advanced tutorial covers more sophisticated topics for manipulating XML documents with Java technology. Author Doug Tidwell shows you how to do tasks such as generate XML data structures, manipulate those structures, and interface XML parsers with non-XML data sources. As you'd expect, all of the examples are based on open standards.

Prerequisites

This tutorial assumes that you know how to compile and run a Java program, and that you know how to set your CLASSPATH variable.


System requirements

You will need JavaScript enabled in your browser.

To run the examples, set up your machine as follows:

  1. First, visit the home page of the Xerces XML parser at the Apache XML Project (http://xml.apache.org/xerces2-j/). You can also go directly to the download page (http://xml.apache.org/xerces2-j/download.cgi).
  2. Unzip the file that you downloaded from Apache. This creates a directory named xerces-2_5_0 or something similar, depending on the release level of the parser. The JAR files you need (xercesImpl.jar and xml-apis.jar) should be in the Xerces root directory.
  3. Visit the JDOM project's Web site and download the latest version of JDOM (http://jdom.org/).
  4. Unzip the file you unloaded from JDOM. This creates a directory named jdom-b9 or something similar. The JAR file you need (jdom.jar) should be in the build directory.
  5. Finally, download the zip file of examples for this tutorial, x-java3_codefiles.zip, and unzip the file.
  6. Add the current directory (.), xercesImpl.jar, xml-apis.jar, and jdom.jar to your CLASSPATH.

Other tutorials in this series are:



Duration

Under two hours


Formats

html, pdf


Share this....

digg Digg this story del.icio.us del.icio.us Slashdot Slashdot it!


Back to top


Document options

Document options requiring JavaScript are not displayed