turn off validation
It doesn't "validate" against the dtd if you tell it not to. It does
still
parse the dtd, parse entities, load default attribute values etc.
because
that's what dtd's are for. Certain parser flags may be available for
certain
parsers to limit this somewhat, but that's beyond what jdom has any
control
over.
Here's an example of setting Xerces to not validate w/ external DTD:
...
SAXBuilder builder = new SAXBuilder();
builder.setFeature("http://apache.org/xml/features/nonvalidating/load-ex
ternal-dtd", false);
...
still
parse the dtd, parse entities, load default attribute values etc.
because
that's what dtd's are for. Certain parser flags may be available for
certain
parsers to limit this somewhat, but that's beyond what jdom has any
control
over.
Here's an example of setting Xerces to not validate w/ external DTD:
...
SAXBuilder builder = new SAXBuilder();
builder.setFeature("http://apache.org/xml/features/nonvalidating/load-ex
ternal-dtd", false);
...
0 Comments:
Post a Comment
<< Home