Hi,
I have the following xml file which is part of a n-level tree:
<TREENODES>
<TreeNode Text="A1" NodeData="1" NavigateUrl="" ImageUrl="">
<TreeNode Text="A2" NodeData="12" NavigateUrl=""
ImageUrl=""></TreeNode>
<TreeNode Text="A3" NodeData="13" NavigateUrl=""
ImageUrl=""></TreeNode>
<TreeNode Text="A22" NodeData="14" NavigateUrl=""
ImageUrl=""></TreeNode>
</TreeNode>
<TreeNode Text="B53" NodeData="2" NavigateUrl="" ImageUrl="">
<TreeNode Text="B29" NodeData="15" NavigateUrl=""
ImageUrl=""></TreeNode>
</TreeNode>
</TREENODES>
and i'm trying to select all descendants of a node with NodeData=x but i
can't seem to select the parent. (black page)
here the code:
Dim doc As XPathDocument = New
XPathDocument(Server.MapPath("Xml/LocationsTree.xml"))
Dim nav As XPathNavigator = doc.CreateNavigator()
nav.MoveToRoot()
nav.MoveToId("descendant::TREENODES[@NodeData='2']")
Response.Write(nav.GetAttribute("Text", ""))
what am i doing worng ?