Gets the markup representing this node and all its child nodes.
using System; using System.IO; using System.Xml; public class Sample { public static void Main() { XmlDocument doc = new XmlDocument(); doc.LoadXml("<book genre='novel' ISBN='1-111111-57-5'>" + "<title>C#</title>" + "</book>"); XmlNode root = doc.DocumentElement; Console.WriteLine("Display the OuterXml property..."); Console.WriteLine(root.OuterXml); Console.WriteLine(); Console.WriteLine("Display the InnerXml property..."); Console.WriteLine(root.InnerXml); } }