Hi,
I can't figure out for the life of me how to select nodes using a namespace
in XpathNavigator. For example:
XPathDocument doc = new XPathDocument("file.xml");
XPathNavigator nav = doc.CreateNavigator();
XPathNodeIterator itr = nav.Select("/foo:bar");
Throws the exception "Namespace Manager or XsltContext needed. This query
has a prefix, variable, or user-defined function"
I notice that the Select() function of XmlDocument allows me to supply a an
XmlNamespaceManager object as a parameter, but neither XPathDocument or
XPathNavigator seem to have any such feature.
I'm happy to create an XmlNamespaceManager if someone could please explain
exactly where I should put it :)
Andy