I believe there is a feature you can set on most parsers to turn off DTD loading. For Xerces Java 1, it is http://apache.org/xml/features/nonvalidating/load-external-dtd.
-----Original Message----- From: Christina Takara [mailto:[EMAIL PROTECTED] Sent: Thursday, June 19, 2003 4:38 PM To: [EMAIL PROTECTED] Subject: [dom4j-user] ignoring DTD reference I am trying to read an XML document with org.dom4j.io.SAXReader. The DTD is referenced in the Document, so I still get the following exception when I set the SAXREader to be non-validating. org.dom4j.DocumentException: Connection refused: connect Nested exception: Conne ction refused: connect at org.dom4j.io.SAXReader.read(SAXReader.java:342) at org.dom4j.io.SAXReader.read(SAXReader.java:256) I referenced the following message and attempted to implement the EntityResolver: http://www.mail-archive.com/[EMAIL PROTECTED]/msg00829.ht ml However, I do not want to change where the DTD is loaded from, I want to not reference the DTD. I attempted to implement the EntityResolver in this manner: EntityResolver resolver = new EntityResolver() { public InputSource resolveEntity(String publicId, String systemId) { return null; } }; But this gives me the same results. Is there a way to ignore the DTD if it is referenced in the Document? Christina ------------------------------------------------------- This SF.Net email is sponsored by: INetU Attention Web Developers & Consultants: Become An INetU Hosting Partner. Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission! INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php _______________________________________________ dom4j-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/dom4j-user ------------------------------------------------------- This SF.Net email is sponsored by: INetU Attention Web Developers & Consultants: Become An INetU Hosting Partner. Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission! INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php _______________________________________________ dom4j-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/dom4j-user