Hi All,
I have a small XML file as below (books.xml)
<bookstore>
<book genre="autobiography" publicationdate="1981" ISBN="1-861003-11-0">
<title>The Autobiography of Benjamin Franklin</title>
<author>
<first-name>Benjamin</first-name>
<last-name>Franklin</last-name>
</author>
<price>8.99</price>
</book>
</bookstore>
I want to find out how I can reach the node <authorwithout navigation
through each node.
I am trying to use the following code in C#. I do not get any error but the
node position is still at the root. How can I reach the node level that I want
XPathDocument doc = new XPathDocument("books.xml");
XPathNavigator nav;
nav = doc.CreateNavigator();
nav.MoveToRoot();
nav.MoveToNamespace("/bookstore/book/authro");
I may be using the correct methods to navigate to the correct root, but I
want to know how I can achieve this.
Thanks
Pradeep_tp