I am trying to get certain nodes within an xml doc that contain certain
text (similar to a SQL LIKE). In doing so I am using the XPATH Contains
function and have not been successful. When I run I get the following
error:
System.Xml.XPath.XPathException: XsltContext is needed for this query
because of an unknown function.
I can successfully get simple xpath queries to work, just none using
the Contains function. Any help would be appreciated.
---------------------------------------------------------
Dim dom As New XmlDocument
Dim nodeList As XmlNodeList
Dim nsManager As New XmlNamespaceManager(dom.NameTable)
nsManager.AddNamespace("xsi",
"http://www.w3.org/2001/XMLSchema-instance")
dom.Load(txtFile.Text)
Dim query As String = "//TypeName[Contains(., '_LU_')]"
nodeList = dom.SelectNodes(query, nsManager)
Tim