S
Son Ha
Hi newsgroup!
My English is not so good please try to understand my mind 8-]
My XML file as below:
[UserAuthentication.xml]
<?xml version="1.0" encoding="UTF-8"?>
<Users>
<User name="Administrator" pwd="password"/>
<User name="Guest" pwd="guess"/>
</Users>
Here's my XPath querry:
public static void RunXPath()
{
XmlDocument xmlDoc = new XmlDocument(); xmlDoc.Load(@"F:\Projects\CSharp\Freeware\DocMan\bin\Debug\UserAuthentication.xml");
XmlNodeList nodes = xmlDoc.SelectNodes(@"/Users/User[name='Administrator']");
foreach(XmlNode node in nodes)
{
Debug.WriteLine(node.OuterXml);
}
}
When i ran this code, nothing display in debug window
Thanks for your help,
MK
My English is not so good please try to understand my mind 8-]
My XML file as below:
[UserAuthentication.xml]
<?xml version="1.0" encoding="UTF-8"?>
<Users>
<User name="Administrator" pwd="password"/>
<User name="Guest" pwd="guess"/>
</Users>
Here's my XPath querry:
public static void RunXPath()
{
XmlDocument xmlDoc = new XmlDocument(); xmlDoc.Load(@"F:\Projects\CSharp\Freeware\DocMan\bin\Debug\UserAuthentication.xml");
XmlNodeList nodes = xmlDoc.SelectNodes(@"/Users/User[name='Administrator']");
foreach(XmlNode node in nodes)
{
Debug.WriteLine(node.OuterXml);
}
}
When i ran this code, nothing display in debug window

Thanks for your help,
MK