I need to delete specific employee node and also its child node based on the value of id. For example, here I need to delete employee tag with id=\"2\".
<
Assuming you have loaded that into an XmlDocument named doc:
XmlDocument
doc
XmlElement el = (XmlElement)doc.SelectSingleNode("/company/employee[id=2]"); if(el != null) { el.ParentNode.RemoveChild(el); }