Hi,
I have a problem with the 'substring' function of XPath in VB.NET (VS 2005).
My code looks like this:
I get the following message (translated from italian)
"XsltContex t is necessary for the query due to an unknown function."
Neither of the two AddNameSpace statements works.
Any suggestions?
Thanks
I have a problem with the 'substring' function of XPath in VB.NET (VS 2005).
My code looks like this:
Code:
dim Dom As new XmlDocument
Dim mgr As New XmlNamespaceManager(Dom.NameTable)
'mgr.AddNamespace("fn", "http://www.w3.org/2005/xpath-functions/#substring")
mgr.AddNamespace("fn", "http://www.w3.org/2005/xpath-functions")
Dom.Load(fileXml)
Dim nodeList As XmlNodeList
Dim root As XmlNode = Dom.DocumentElement
nodeList = root.SelectNodes("//*[fn:substring(@MittDest,1,1)='a']", mgr)
"XsltContex t is necessary for the query due to an unknown function."
Neither of the two AddNameSpace statements works.
Any suggestions?
Thanks
Comment