[jdom-interest] error msg compiling example class

Philipp Zuderell philipp.zuderell at tanner.de
Tue Aug 8 01:28:20 PDT 2000


Hi all,

when I try to compile the example program from the javaworld article, I
get the following error msg:
PrettyPrinter.java:15: class org.xml.sax.InputSource not found in void
main(java.lang.String[]).

How can I fix it?

Thanks, Phil

The code is as follows:

import java.io.*;
import org.jdom.*;
import org.jdom.input.*;
import org.jdom.output.*;

public class PrettyPrinter {
  public static void main(String[] args) {
  // Assume filename argument
  String filename = args[0];

  try {
    // Build the document with SAX and Xerces, no validation
    SAXBuilder builder = new SAXBuilder();
    // Create the document
    Document doc = builder.build(new File(filename));

    // Output the document, use standard formatter
    XMLOutputter fmt = new XMLOutputter();
      fmt.output(doc, System.out);
  }
  catch (Exception e) {
    e.printStackTrace();
  }
  }
}
--
P.S. Tanner Dokuments ist umgezogen, bitte geaenderte
     Adresse beachten! - Tanner Dokuments has moved;
     please notice the changed address!

----------------------------------------------------
Tanner Dokuments GmbH+Co
Philipp Zuderell
Kemptener Strasse 99
D-88131 Lindau
Germany

tel +49(0)8382/272-278
fax +49(0)8382/272-900
mailto:philipp.zuderell at tanner.de
http://www.tanner.de
----------------------------------------------------





More information about the jdom-interest mailing list