XmlNode.RemoveAll() : XmlNode « System.Xml « C# / C Sharp by API






XmlNode.RemoveAll()

 

using System;
using System.Xml;

class MainClass
{
  static void Main(string[] args)
  {
    XmlDocument doc = new XmlDocument();
    doc.LoadXml("<R> Value </R>");

    XmlNode root = doc.DocumentElement;
    doc.Save(Console.Out);

    root.RemoveAll();

    doc.Save(Console.Out);
  }
}

   
  








Related examples in the same category