Add extension method to delete nodes

We can't delete nodes while we're iterating over a node list because
that modifies the enumeration we're looping over. The new extension method
puts the nodes to delete in an array and then deletes them from their
parent node.
Since ToArray() always creates a copy, could you just do something like the following:
foreach (var toDelete in nodeList.OfType<XmlElement>().ToArray())
    toDelete.ParentNode.RemoveChild(toDelete);

It has the same effect, but is less code.