using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Xml; using System.Xml.XPath; using System.IO; namespace VXML { class parser { public void getXML() { XmlDocument doc = new XmlDocument(); doc.Load("C:\\Users\\golubev\\Documents\\Личное\\xmlDeser\\bookstore.xml"); XmlNode root = doc.DocumentElement; XmlNamespaceManager nsmg = new XmlNamespaceManager(doc.NameTable); nsmg.AddNamespace("bk", "url:newbooks-schema"); XmlNode node = root.SelectSingleNode( "descendant::bk:book[bk:author/bk:last-name='Kingsolver']", nsmg); Console.WriteLine(node.InnerXml); } } }