private const string TestXml =
"<?xml version=\"1.0\" encoding=\"utf-8\"?>" +
"<Name>Batman Returns</Name>" +
"<Name>Batman Dark Knight</Name>" +
public static void Main()
XmlDocument xmlDoc = new XmlDocument();
string xpath = "MovieData/Movies/Movie";
var nodes = xmlDoc.SelectNodes(xpath);
foreach(XmlNode childrenNode in nodes)
"Movie - Id: " + childrenNode.SelectSingleNode(".//Id").InnerText +
", Name: " + childrenNode.SelectSingleNode(".//Name").InnerText);