2
Answers

xmlpath help...

john

john

20y
1.8k
1
I have an xmlnodelist bound to a datalist. I can access root elements in the list but can't figure out how to get a child of a child. I know I should use xpath but can not seem to get it to work. At the moment i can get root elements: <%#(CType(Container.DataItem, System.XML.XMLNode))("low").InnerText%> but i need to select the innertext of grandchild element "t" of a child element "part" that has a p attribute of "d" this is what i have at the moment but it doesn't work: <%#(CType(Container.DataItem.SelectSingleNode, System.XML.XMLNode))("part[@p=d]/t").InnerText%> <----begin xml document 30 22 6:05 AM 6:54 PM 32 Sunny <----------------want to display this text 23 N/A 166 SSE 0 48 31 Clear 21 N/A 124 SE 0 61
Answers (2)