I want select all values from node but something is wrong because message box don't show anything. XML file is in this same folder where is project.
XML:
<?xml version="1.0" encoding="UTF-8" ?>
<names>
<file>
<name>Test name 1</name>
<author>Test author 1</author>
<version>1.0</version>
</file>
<file>
<name>Test name 2</name>
<author>Test author 2</author>
<version>2.0</version>
</file>
<file>
<name>Test name 3</name>
<author>Test author 3</author>
<version>3.0</version>
</file>
</names>
C# Code:
XmlDocument xml = new XmlDocument();
xml.LoadXml(Files.xml);
XmlNodeList xnList = xml.SelectNodes("names/file/name");
foreach (XmlNode xn in xnList)
{
MessageBox.Show(xn.ToString());
}
/names/file/name