 | Level: Introductory Doug Tidwell (dtidwell@us.ibm.com), XML Evangelist, IBM
13 Jan 2004 This updated tutorial covers the basics of manipulating XML documents using Java technology. Doug Tidwell looks at the common APIs for XML and discusses how to parse, create, manipulate, and transform XML documents.
Prerequisites
XML has become a universal data format. This updated tutorial introduces the common APIs for XML and discusses how to parse, create, manipulate, and transform XML documents. The tutorial examines different ways to do these common tasks, the standards involved, and when to use a specific approach. The tutorial explores the following APIs:
- The Document Object Model (DOM), Level 2
- The Simple API for XML (SAX), Version 2.0
- JDOM, a simple Java API created by Jason Hunter and Brett McLaughlin
- The Java API for XML Processing (JAXP)
Other tutorials in this series are:
System requirements
You will need JavaScript enabled on your browser. To run the examples, set up your machine as follows:
- Download the Xerces XML parser at the Apache XML Project (http://xml.apache.org/xerces2-j/) or directly from the download page (http://xml.apache.org/xerces2-j/download.cgi).
- Unzip the downloaded file from Apache to create 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.
- Download the latest version of JDOM from the JDOM project's Web site (http://jdom.org/).
- Unzip the file downloaded from JDOM to create a directory named jdom-b9 (or something similar). The JAR file you need (jdom.jar) should be in the build directory.
- Finally, download the zip file of examples (xmlprogj.zip) for this tutorial and unzip the file. Note: You must register for the tutorial before you can download this zip file (https://www6.software.ibm.com/developerworks/education/xmljava/xmlprogj.zip) from the Introduction > Setting up your machine panel.
- Add the current directory (.), xercesImpl.jar, xml-apis.jar, and jdom.jar to your CLASSPATH.
Duration
Under one hour
Formats html, pdf
|  | |  |