Skip to Main Content

Java Programming

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 DOCTYPE when parsing xml java?

807588Jan 21 2009 — edited Jan 21 2009
Hello
i am trying to parse some sml files that have:
<!DOCTYPE ModuleRoot SYSTEM "C:\xxx\xmlapp.dtd">
i don;t have the dtd file
how can i ignore it by changing my code and not changing the xml file.

DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance();
DocumentBuilder documentBuilder = documentBuilderFactory.newDocumentBuilder();
this.doc = documentBuilder.parse(xmlFileName);

i got exception in this.doc = documentBuilder.parse(xmlFileName);
(The system cannot find the path specified)

Thanks in advance.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 18 2009
Added on Jan 21 2009
3 comments
5,940 views