commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Craig McClanahan <craig...@apache.org>
Subject Re: [Digester] How do I get Digester to ignore the <!DOCTYPE> tag
Date Wed, 14 Jul 2004 21:26:15 GMT
Paolo Valladolid wrote:

>I need to use Digester to parse XML that has been retrieved from a
>database.  The XML I'm working with was received from elsewhere (ie. Not
>created by our team).  How do I get Digester to ignore the <!DOCTYPE>
>tag?  I've tried setValidating( false ) and it did not work.
>
>  
>
The setValidating(false) call does indeed tell Digester to not validate 
the XML data.  However, it does *not* tell the underlying XML parser to 
skip the DOCTYPE, and there is no API in JAXP to say that sort of thing.

If your problem is unresolved entities, one thing you can do is to 
provide your own EntityResolver method whose resolveEntity() method 
always returns null.  That way, the parser won't go traipsing around the 
network trying to find things that it can't.

> 
>
>Thanks,
>
> 
>
>Paolo Valladolid
>
>Software Developer
>
>DFI International Government Services
>
> 
>
>
>  
>
Craig


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message