Is there a way to store xpath query results in a variable?
Currently, I am trying to do this:
Dim ERMdoc As New XPathDocument(path + "ermodel.xml")
Dim ERMnav As XPathNavigator = ERMdoc.CreateNavigator()
For Each node In ERMnav.Select("//ns1:erNode", nsmgr)
xmlNodeId = node.SelectSingleNode("//ns1:erNode/@id", nsmgr)
Next
Response.Write (xmlNodeId)
But I keep getting this error:
Unable to cast object of type
'MS.Internal.Xml.Cache.XPathDocumentNavigator' to type
'System.Xml.XmlAttribute'.
Am I missing something?
Thanks!