Lets imagine we have task: Select all nodes <Test> from XML file using Xpath and delete them. No problem: XmlNodeList nodeList = xml.SelectNodes("//Test"); foreach (XmlNode node in nodeList) { node.ParentNode.RemoveChild(node)…