renaming nodes or changing node's name

Hello,

	I'm trying to change the name of some node. I can not succeed. I
didn't find any setNodeName(String ). 
So I tried the following code where I create a new node to which I append
attributs removed from old node>
I get an exception (on the removal of attribut) with the message : DOM008
not found ???

What does mean this message ?
How can I make my code works ?

thanks for help.

            itemList = doc.getElementsByTagName("spec_itemid");
	for(int i=0;i<itemList.getLength();i++)
	    {
		Node  item = itemList.item(i);
		Node parent = item.getParentNode();
		Element newNode = doc.createElement("liste_item_id");
		parent.appendChild(newNode);
		showEntireDoc(doc);
		if(item.getNodeType()==Node.ELEMENT_NODE)
		    {
		    NamedNodeMap listAtt= item.getAttributes();
		    if(listAtt!=null)
			{
			    for(int a=0;a<listAtt.getLength();a++)
				{
				    Node att = listAtt.item(a);
	
listAtt.removeNamedItem(item.getNodeName());
				    newNode.appendChild(listAtt.item(a));
				}
			}
		    }
		parent.removeChild(item);
	    }

Armelle CLECH

 france télécom R&D / DMI /GRI
technopole Anticipa                       email:
armelle.clech@rd.francetelecom.fr
2, Avenue Pierre Marzin                            	   Téléphone (33) 2
96 05 07 52
22307        Lannion Cedex                         	   Télécopie  (33) 2
96 05 32 86

Received on Wednesday, 8 November 2000 08:49:22 UTC