This how to shows how to remove some xml nodes:
XML File:
<?xml version="1.0" encoding="utf-8"?>
<CategoryList>
<Category ID="01">
<MainCategory>XML</MainCategory>
<Description>This is a list my XML articles.</Description>
<Active>true</Active>
</Category>
</CategoryList>
Code:
XmlDocument xmlDoc = new XmlDocument();
xmlDoc.Load(Server.MapPath("categories.xml"));
XmlNode node = xmlDoc.SelectSingleNode("/CategoryList/Category[@ID='01']");
XmlNode commonParent = node.ParentNode;
if(node != null)
{
commonParent.RemoveChild(node);
}
xmlDoc.Save(Server.MapPath("categories.xml"));

