/* Assuming you have an XML file that's like this: Hello World: The Ultimate Manual */ using System.Xml; void DoXmlStuff () { XmlDocument doc = new XmlDocument (); try { doc.Load ("/tmp/myxmlfile.xml"); } catch (Exception e) { Console.WriteLine ("something bad happened"); return; } XmlNode node = doc.SelectSingleNode ("book-name"); if (node != null) { string bookName = node.InnerText; Console.WriteLine ("The book name is: {0}", bookName); } }