xmliter samples

Traverse.java - the Traverse program source code

doc.xml - a sample XML input file

doc.html - a sample XHTML input file

XmlIterator - a discussion of the traverse() and traverseMixed() methods of the sample

To run the sample program you must set your classpath to contain all of the following:

  1. the lib/xmliter.jar file containing the xmliter library
  2. the samples directory containing the sample .class files
  3. the jar files for an XML parser of your choice

Run the sample using this usage command:

 usage: java Traverse -in XML_FILE
   [-h | -help] # print this message
   [-mixed]     # use advanceMixed()
   [-dom]       # use DomIterator

Where XML_FILE is one of the input files in the samples directory or any XML file of your choosing.

For example:

>> cd samples
>> java Traverse -in doc.xml

Copyright (c) 2003 Mark T. Hayes; All Rights Reserved