Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » JDOM User »

[jdom-interest] How to supress external DTD error

Andrew Zahra

2005-11-27

Replies:

I am trying to parse a simple document being sent to me over TCP. I am using the SAXBuilder class with its default constructor. Problem is the XML doc I am receiving specifies a DTD. Even though I am not validating the document I get an error saying that the external DTD file is not found.

If I create an empty DTD file it is happy, but I don't want to do this.

Is there any way I can stop it trying to open the external DTD or supress the error and make it continue?

I did try using setErrorHandler with an error handler that just returned on error but that didn't work.
_______________________________________________
To control your jdom-interest membership:
http://www.jdom.org/mailman/options/jdom-interest/youraddr@(protected)
©2008 junlu.com - Jax Systems, LLC, U.S.A.