XmlDataDocument.Load
using System; using System.IO; using System.Xml; public class MainClass { public static void Main() { try { XmlDataDocument myXmlDocument = new XmlDataDocument(); myXmlDocument.Load("Sample.xml"); myXmlDocument.Save(Console.Out); } catch (Exception e) { Console.WriteLine("Exception: {0}", e.ToString()); } } }