|
Java™ by example!
|
|
|
How do I turn off DTD validation?
As soon as you create the DocumentBuilderFactory, call the method setValidating and set it to false. Try out following example and set it to true to see the parsing errors. customers.dtd (!!remove the space between ? and xml):
customers.xml (!!remove the space between ? and xml):
Main.java:
Further Information
Author of answer: Joris Van den Bogaert
Comments to this answer are only viewable by members. Login or become a member!
|
|
|
|
|