[jdom-interest] Element name

Jason Hunter jhunter at collab.net
Fri Jan 12 18:35:59 PST 2001


phil at triloggroup.com wrote:
> 
> What's the reason why the setName()/setNamespace() method is not 
> availble in the Element class ? 

The logic is, because then it's not the same element.  See old posts
from Elliotte for his justification.  I agree it's a little
counterintuitive.

> I need it because some method have to return an Element and the 
> caller add that result with a specifc name. The calle
> don't know that name while creating the Element. And copying 
> (with getCopy()) is not efficient and break som references
> on that element.

Easiest to make a new element and transfer the contents.

-jh-



More information about the jdom-interest mailing list