Mega Code Archive
Removes all specified attributes and children of the current node Default attributes are not removed
using System;
using System.IO;
using System.Xml;
public class Sample
{
public static void Main()
{
XmlDocument doc = new XmlDocument();
doc.LoadXml("" +
"C#" +
"");
XmlElement root = doc.DocumentElement;
root.RemoveAll();
Console.WriteLine("Display the modified XML...");
Console.WriteLine(doc.InnerXml);
}
}