Use SelectNodes to query nodes by XPath
using System;
using System.Xml;
class MainClass {
private static void Main() {
XmlDocument doc = new XmlDocument();
doc.Load("orders.xml");
XmlNodeList nodes = doc.SelectNodes("/Order/Items/Item/Name");
foreach (XmlNode node in nodes) {
Console.WriteLine(node.InnerText);
}
Console.ReadLine();
}
}
|
HTML code for linking to this page:
Related in same category :
-
-
-
-
-
-
-
|