Change NodeName of an XML tag element using MSXML
问题 I'd like to change the tag name of a MSXML XMLDOMElement, but unfortunately the nodeName property is read-only. Is there any straightforward way to do it, or have I to work around by doing some insert/replace and deep copy children? <xml> ... <oldTagName> ... sub-elements </oldTagName> <more xml> ... Should become <xml> ... <newTagName> ... sub-elements </newTagName> <more xml> ... 回答1: According to Document Object Model you can't rename a node. See: http://www.w3.org/TR/DOM-Level-2-Core/core