[jdom-interest] First pass at Namespace revision[eg]

James Duncan Davidson duncan at x180.net
Mon Apr 2 19:22:16 PDT 2001

> I forget when and why getCopy() got added. It was probably a compromise 
> to avoid adding setName() and setNamespace() methods to Element. But 
> frankly it strikes me as weird and unnecessary. I'd prefer to delete it 
> from the Element class. It could plausibly belong in a separate 
> JDOMUtils class or package, but I'd prefer not to clutter the core API 
> with it.

I've not no opinion on getCopy except that it would seem that clone 
would work in this situation, no?

For setName()/space() -- these methods *should* be added to the API. The 
use case for this is data manipulation from one XML doc to another with 
the same elements/data. Say I've got a servlet receiving content from 
the web in XML and I'm going to write it to disk, but first I want to 
change it to my own thoughts of what the XML should be -- if I can't use 
a setName, then I have to do XSLT -- way too much overhead for something 
so simple -- especially if I've already got the data in JDOM.

James Duncan Davidson
duncan at x180.net

More information about the jdom-interest mailing list