How to remove xml elements using RemoveChild()?

This how to shows how to remove some xml nodes:

XML File:

<?xml version="1.0" encoding="utf-8"?>
  <Category ID="01">
    <Description>This is a list my XML articles.</Description>


XmlDocument xmlDoc = new XmlDocument();
XmlNode node = xmlDoc.SelectSingleNode("/CategoryList/Category[@ID='01']");
XmlNode commonParent = node.ParentNode;

if(node != null)



I am Muhammod Arifur Rahman, CEO and founder of I worked on mainly. My second skill language is php and wordpress. I am also work on jquery. I love to work with new problem and feel happy when solve. is my own company.

Got something to say? Go for it!


More in Xml (3 of 4 articles)