xml.dom.minidom.Node.replaceChild

Node.replaceChild(newChild, oldChild)[source]