[jdom-interest] RE: Turning off validation against a DTD

Dirk Leas dirkLeas at mac.com
Wed Sep 11 03:41:33 PDT 2002


Message: 13
Date: Tue, 10 Sep 2002 18:13:16 -0700 (PDT)
From: Philip Nelson <panmanphil at yahoo.com>
Subject: Re: [jdom-interest] Turning off validation against a DTD
To: "Indrayan, Rahul" <rindrayan at ets.org>,
        "'jdom-interest at jdom.org'" <jdom-interest at jdom.org>

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);
    ...

HTH,
D





More information about the jdom-interest mailing list