[jdom-interest] SAXBuilder bug reading DTD internal subset?

Sergio Sierra ssierra at bigfoot.com
Wed May 29 09:47:28 PDT 2002


Hi Laurent!, thank you very much for your fast response.

It's works!!

Thanks!!!

Sergio


Laurent Bihanic wrote:

>Try setting expandEntities to false on SAXBuilder to force the
registration of 
>the DeclHandler:
>   builder = new SAXBuilder(true);
>   builder.setExpandEntities(false);
>   doc = builder.build(new StringReader(data));

>Laurent



>Sergio Sierra wrote:
>> Hello!
>> 
>> I'm need to read a XML file with a DTD internal subset using 
>> SAXBuilder
>> (beta8) and Xerces, but when the parse process has finished and i run
>> the DocType getInternalSubset() method, there is not any DTD data.
This

>> method returns an empty String. The XML file is valid with a valid
DTD
>> internal subset. 
>> 
>> I don't know what's the real reason for this behaviour. Sorry if the 
>> reason is mine, but i'm not a english speaker so it's a little hard 
>> for me to learn to use the JDOM API.
>> 
>> Do i have to configure SAXBuilder with any particular feature?
>> 
>> I think the problem not occurs if I use DOMBuilder, but becasuse it 
>> has deprecated methods since version 7, so, i must to use SAXBuilder.
>> 
>> There are the code lines i use to make the jdom tree from my xml
file.
>> ---------
>> (...)
>> 	builder = new SAXBuilder(true);
>> 	doc = builder.build(new StringReader(data));
>> (...)
>> ---------
>> 
>> Thanks for your help,
>> 
>> Sergio
>> 









More information about the jdom-interest mailing list