Sorry, for the probably simple question. I'm not an expert on DOM. I need to clone a Node (including all its childs) and assign a new name to this copy. I found the method to clone the Node and to get the name, but there seems to be no way to change/set the name. The only way, I found, to create a new Node/Element and to assign a name to it, is by Document.createElement(). Could someone please guide me in the right direction in how to effectively clone a Node and all it's childs and to assign a new to the copy? thanks Juergen
In DOM Level 1 and 2, nodes may not be renamed. Create a new node with the appropriate name, and copy the other content to it. DOM Level 3 (currently under development, may or may not yet be prototyped in Xalan) adds the method renameNode... but you should read the description of that method carefully, as not all DOMs can support renaming an existing node object and the method may have to create a new one. Given the workaround, and given the new DOM method in the pipe, I think this request is pretty well covered...