Hi All.
I want xpath query for the above XML.. please find the line with Bold Blue color.
I need value for path="file://c:/programs/manufacturer/icons/device.ico" />
I tried to do this but getting exception (Namespace Manager or XsltContext needed. This query has a prefix, variable, or user-defined function. ). Can Some one help me out with XPATH query ASAP.
Thanks in Advance.

Manikavelu VelayuthamPosted Jan 24, 2011, 5:12 AM
XmlDocument xemaildoc = new XmlDocument();
xemaildoc.Load("xemaildoc.xml");
XmlNamespaceManager man = new XmlNamespaceManager(xemaildoc.NameTable);
man.AddNamespace("xsl", "http://www.w3.org/1999/XSL/Transform");
XmlNode titlenode = xemaildoc.SelectSingleNode("/xsl:stylesheet/xsl:template[@match='/']/title", man);
string subjecttext = titlenode.InnerText;
Rajendra TripathyPosted Jan 24, 2011, 4:58 AM
thanks for your reply .. But I tried with this and getting error (Namespace Manager or XsltContext needed. This query has a prefix, variable, or user-defined function.)..
In that XML u can see some Namespaces are there..
Manikavelu VelayuthamPosted Jan 24, 2011, 4:47 AM
XmlDocument xmlDoc = new XmlDocument();
xmlDoc.Load("test.xml");
XmlNode conStringNode = xmlDoc.SelectSingleNode("/RKT/IOInfo/IODeviceTypes/RKT:IODeviceType/RKT:DeviceIcon");
string strPath = conStringNode.Attributes["path"].Value.ToString();