thanks
LJB
If you want to access a single node you might want to use
SelectSingleNode instead of Evaluate, that way you get an XPathNavigator
and can access the Value property e.g.
XPathNavigator server =
nav.SelectSingleNode("//location[@office='JAC']/@server");
if (server != null) // XPath found node
{
Console.WriteLine(server.Value);
}
else // handle case that no node was found
{
//
}
--
Martin Honnen --- MVP XML
http://msmvps.com/blogs/martin_honnen/
THANK YOU. It works perfectly.