[jdom-interest] Request -- please allow all XML 1.1 conformant text in Element.se tText()

Dennis Sosnoski dms at sosnoski.com
Sun Mar 7 11:19:35 PST 2004


Elliotte Rusty Harold wrote:

>At 8:05 PM +1100 3/7/04, Chris B. wrote:
>  
>
>>When you inherit and dive into the internals, you say goodbye to 
>>backwards compatibility. So what? If you choose to do that, it is 
>>your choice. Are you my nanny?
>>    
>>
>
>Yes, we are. That's why you're using an API rather than rolling your 
>own code. You're assigning us the responsibility of properly handling 
>XML so you don't have to. A good API does not require the users to be 
>subject domain experts (though the API designers had better be.)
>
We've had discussions about this many times before on the JDOM mailing 
list. I understand that this is the intent behind JDOM (and XOM), and 
for many users it's probably an very appropriate approach. For those 
users who prefer to take the responsibility upon themselves there are 
other APIs that are designed more for power rather than to safeguard 
users. Rather than going through this argument every time on the list it 
might be better to simply refer users who are looking to escape the 
comfortably padded environment of JDOM to one of these other APIs.

Chris, I suggest you look into using dom4j (http://www.dom4j.org). dom4j 
is fast and flexible, though the complexity of the multiple layers of 
interface classes used in the API can make it a little challenging to 
work with at first. It uses protected fields extensively, with both the 
advantages and drawbacks that have been discussed on this list. The 
dom4j API is also stable and has been production released for over two 
years.

  - Dennis




More information about the jdom-interest mailing list