Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to ignore the DTD in an XML file

843834Nov 9 2001 — edited Nov 13 2001
I am using XMLReader as
XMLReader parser = XMLReaderFactory.createXMLReader("org.apache.xerces.parsers.SAXParser");

to parse an xml document. The XML has a <!DOCTYPE ....> in it which specifies a dtd file. If I do not have the dtd file on my local machine, the parser will fail. How can I tell the parser to ignore the <!DOCTYPE..> line, since I do not want it to validate against the dtd anyway?

Thanks.

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 11 2001
Added on Nov 9 2001
3 comments
1,212 views