[jdom-interest] Ignoring undeclared entities?

Jason Hunter jhunter at xquery.com
Tue Dec 21 08:23:08 PST 2004


Probably you're not really using Xerces then.

You can setErrorHandler() on the SAXBuilder and control what happens to 
supposedly fatal errors.  Whether that'll work or not depends I suppose 
on your parser and its ability to recover.

-jh-

george georgovassilis wrote:

> Thank you Jmt
> 
> I actually came across this while searching for a solution, but when 
> using most of the features described there I get something like an 
> unknown feature exception...
> G.
> 
>> I have not checked this, but, if you use xerces as sax parser (which 
>> is usually the default parser), you can disabled loading of external 
>> entities :
>>
>> http://xml.apache.org/xerces2-j/features.html
>>
>> because this feature is enabled by default.
>>
>> Hope this helps,
>>
>> jmt
>>
>>
>> On Tuesday 21 December 2004 10:08, george georgovassilis wrote:
>>  
>>
>>> Dear All
>>>
>>> I'm using jdom 0.9 and have sometimes to parse XML with undeclared
>>> entities. The parsing aborts then with an exception which is also a
>>> fatal error (so I can't just ignore it by implementing my own lenient
>>> ErrorHandler). Since there is no way I can get hold of the missing DTDs
>>> anyway, I was wondering if the SaxBuilder (or whichever part I am
>>> missing here) can be instructed not to resolve entities it doesn't know?
>>>
>>> Thanks in advance
>>> George Georgovassilis
>>>
>>> _______________________________________________
>>> To control your jdom-interest membership:
>>> http://www.jdom.org/mailman/options/jdom-interest/youraddr@yourhost.com
>>>   
>>
>>
>>
>>  
>>
> 
> 
> _______________________________________________
> To control your jdom-interest membership:
> http://www.jdom.org/mailman/options/jdom-interest/youraddr@yourhost.com
> 


More information about the jdom-interest mailing list