It's possible with SAX 2.0.2. It supports DTD processing
and validation for XML documents which do not have a DOCTYPE through the
EntityResolver2 interface [1] (the javadoc is a little out of date).
[1] http://www.saxproject.org/apidoc/org/xml/sax/ext/EntityResolver2.html#getExternalSubset(java.l
Hi,
IIRC you can't currently do this easily through the standard API
(I can't recall the last time I worked with a DTD :)). Options:
i) add a doctype after you get the document.
ii) Take a look at some code in Pathan which does validation of sub trees
by looking the root node up in the cu
Hi,
I would like to validate xml dokuments with always the same DTD.
The XML file can have a DOCTYPE .. line or not.
I can not change the XML file.
If I'm getting a XML dokument with a DOCTYPE I'm able to change the DTD to my
default DTD (I'm using the HandlerBase::resolveEntity) - no pr