xml.dom.minidom.DocumentType.replaceChild

DocumentType.replaceChild(newChild, oldChild)