I\'m building a script which has to patch XML files, including replacing one list of elements with another. The following function applies a patch (involving a possibly empt
This is because when you are doing parent.removeChild(node), parent is not necessarily the parent of the node because getElementsByTagName() is doing a recursive search.