D
darrel
I've done a bit of transoforming XML in ASP.net by passing it to an XSL file
and returning the results.
I'm not trying to navigate an XML file and just return one value. I could
use XSL for this, but seems to be overkill to just return one value.
This is what I have thus far:
dim filename As String =
(MapPath("/usercontrols/navigation/siteStructure.xml"))
Dim xDoc As XPathDocument = New XPathDocument(filename)
Dim xNav1 as XPathNavigator = xDoc.CreateNavigator()
xNav1.Select("linkTitle")
dim strLinkTitle as String = xNav1.value
The problem is that xNav1.value returns the entire Node. I just want the
value of the element 'lnkTitle' as a string. I'm completely stumped as to
how to get that via asp.net.
-Darrel
and returning the results.
I'm not trying to navigate an XML file and just return one value. I could
use XSL for this, but seems to be overkill to just return one value.
This is what I have thus far:
dim filename As String =
(MapPath("/usercontrols/navigation/siteStructure.xml"))
Dim xDoc As XPathDocument = New XPathDocument(filename)
Dim xNav1 as XPathNavigator = xDoc.CreateNavigator()
xNav1.Select("linkTitle")
dim strLinkTitle as String = xNav1.value
The problem is that xNav1.value returns the entire Node. I just want the
value of the element 'lnkTitle' as a string. I'm completely stumped as to
how to get that via asp.net.
-Darrel