Mega Code Archive
Removes all the child nodes andor attributes of the current node
using System;
using System.IO;
using System.Xml;
public class Sample {
public static void Main() {
XmlDocument doc = new XmlDocument();
doc.LoadXml("" +
"C#" +
"");
XmlNode root = doc.DocumentElement;
root.RemoveAll();
doc.Save(Console.Out);
}
}