Here is a quick and dirty solution, i tested it briefly and that was the fastest I came up with. Probably there are some nicer solutions:
XmlDocument document = new XmlDocument();
document.Load("C:\\Temp\\New.xml");
XmlNode nodeReq = document.SelectSingleNode("request");
if (nodeReq != null)
{
XmlNode nodeEnReq = nodeReq.SelectSingleNode("enrichment-request");
if (nodeEnReq != null)
{
XmlNode nodeEnrich = nodeEnReq.SelectSingleNode("enrich");
if (nodeEnrich != null)
{
foreach (XmlNode node in nodeEnrich.ChildNodes)
{
if (node.InnerText == "mf_compliant")
nodeEnrich.RemoveChild(node);
}
}
}
}
document.Save("C:\\Temp\\New.xml");