XML DOM renameNode () method
Definition and Usage
renameNode () method to rename an existing element or attribute node.
If possible, this method will change the name of a given node, or the method uses the specified name to create a new node, and then use the new node to replace the existing node.
This method returns renamed node.
grammar
renameNode(node,uri,name)
参数 | 描述 |
---|---|
node | 需要重新命名的元素或属性。 |
uri | 字符串,规定新的命名空间名称。 |
name | 字符串,规定新的名称。 |
Document Object