I use XPathnode to select the report. Now I want to know how I can remove this node from the document without knowing what node children they are with?
I tried calling .RemoveChildand it throws this error:
The node to be deleted is not a child of this node.
This is my code to remove node:
var node = doc.SelectSingleNode("//report");
doc.RemoveChild(node);
source
share