[jdom-interest] Another Element.setName request
Uwe_Hale at i2.com
Uwe_Hale at i2.com
Mon Mar 19 14:38:19 PST 2001
I read through the list archives and the arguments for making the element
name immutable. "An Element with a different name is a different
Element..." or something like that.
I've created a clone, gotten a list from the parent, found the index of the
element, removed it from the list, and inserted the clone at the same
index. Long way around simply renaming something but that works.
The problem is that in other locations in the code, I still have variables
pointing to the original element ( different views). Of course they do
not get updated with the new name since they are completely different
objects. So I now have to write code to replace the old element with the
new clone in several places.
Or just add a setName to the source code and rebuild. <g>
Just another vote to the many others asking for a simple way to setName or
rename the name attribute of the element.
"A rose by any other name is still a rose."
Uwe Hale
More information about the jdom-interest
mailing list