I am writing a program that is parsing XML. I am using the javax.xml.parsers.DocumentBuilder to do the parsing. The problem I have is the XML contains a referance to a DTD. I want to parse to the XML without the DTD. How can I do this?
Francois Dang Ngoc
posted 9 years ago
Do you mean you want to skip the validation of the document (so don't use the DTD)? In this case, you can disable the validation as follows: