[jdom-interest] Reading the xml:base attribute

Elliotte Harold elharo at metalab.unc.edu
Thu Jan 6 10:05:32 PST 2005


Bradley S. Huffman wrote:

> Does JDOM need a getAttribute(String localName, String uri)? So far no one has
> screamed loudly for it.

I suspect not. That would really just duplicate existing functionality 
and JDOM has an unwieldy number of convenience methods already.

I think I was the one who originally came up with the whole Namespace 
class in order to convince Jason and others that attaching a namespace 
to each element wouldn't be excessively heavyweight. At the time they 
didn't want to carry around an extra large string for each element and 
attribute. (It was a few years ago so my memory could be not so accurate.)

In hindsight I regretted this, which is why XOM has no Namespace class, 
just Strings. It turns out that simply interning most of the Strings is 
all you need to get decent memory usage. But by the time I realized this 
I'm afraid the Namespace class was baked pretty deeply into JDOM, and 
couldn't really be pulled out without major hurt for almost all users.

-- 
Elliotte Rusty Harold  elharo at metalab.unc.edu
XML in a Nutshell 3rd Edition Just Published!
http://www.cafeconleche.org/books/xian3/
http://www.amazon.com/exec/obidos/ISBN=0596007647/cafeaulaitA/ref=nosim


More information about the jdom-interest mailing list