[jdom-interest] [NEWBEE] Open an XML-file by using a DTD in a JAR

Andreas Riedel riedelandreas at yahoo.de
Mon Jun 17 07:17:10 PDT 2002

Hello List.

I just start to work with JDOM and made my first test.
To test, I open an existing XML file on my device,
generated for Log4J.

The XML-File starts with:
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">

The source

  SAXBuilder f_SaxBuilder = new SAXBuilder();

  Document f_DocJDOM = null;

  try {
   f_DocJDOM = f_SaxBuilder.build( new File(
"log4jUserAccess.xml" ) );
  } // try
  catch( JDOMException f_excJDOM ) {
  } // catch

The DTD is in the log4j.jar, I included in my

java -cp

But when I run the program, I get the following

org.xml.sax.SAXParseException: File

When I unzip the log4j.jar and copy the log4j.dtd to
that directory, it's run.

But I want, that JDOM open the log4j.dtd in the

Does anybody have an solution for that problem.


Andreas Riedel.


Gesendet von Yahoo! Mail - http://mail.yahoo.de
Yahoo! präsentiert als offizieller Sponsor das Fußball-Highlight des
Jahres: - http://www.FIFAworldcup.com

More information about the jdom-interest mailing list