Thanks evrybody for your answers.
I am implementing a light xml editor using dom and swing.tree, So I have a class SwingTreeNode wich extends DefaultMutableTreeNode, specified like this : When I change the structure of SwingTreeNode, I change the structure of the user objetcs which are Dom nodes (to preserve the Dom structure of the document). So,when I want to change the value of a Dom textNode, I have to access to the good MyTreeNode and change the value of the userObject. That is simple. But, now if I want to change the name of a dom elementNode, I have to clone/import in order to preserve the structure of the dom tree. Due to the clonage the swingtreenodes childs won't contain the good handles to the clone dom Node childs ! And It means that I have to rebuild the SwingTreeNode. Am I right ? > -----Message d'origine----- > De : Arnaud Le Hors [mailto:[EMAIL PROTECTED] > Envoye : mardi 6 mars 2001 18:41 > A : [EMAIL PROTECTED] > Objet : Re: setNodeName() ? > > > There is no way to change the name of an element, along with its > namespace URI if it has one, it's an inherent part of its type and > cannot be changed once the element is created (because in some > implementations it may directly be related to a specific concrete > class). So the only way to achieve this is to actually create an element > with a new name and insert it in place of the other. > -- > Arnaud Le Hors - IBM Cupertino, XML Strategy Group > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > Laurent Foret Service developpement [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> www.korom.net <http://www.korom.net>
