Parse XML String
In this chapter you will learn:
Parse XML string
using System;/*from j av a 2s.com*/
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);
}
}
The code above generates the following result.
Next chapter...
What you will learn in the next chapter: