using System;
using System.IO;
using System.Xml;
public class MainClass
{
public static void Main()
{
XmlDocument xmlDoc = new XmlDocument();
xmlDoc.LoadXml("<book genre='programming'> <title>ADO.NET Programming</title> </book>");
XmlNode root = xmlDoc.DocumentElement;
Console.WriteLine("XML Document Fragment");
xmlDoc.Save(Console.Out);
Console.WriteLine();
Console.WriteLine("XML Document Fragment After RemoveAll");
root.RemoveAll();
xmlDoc.Save(Console.Out);
}
}
|