Hi, I am just wondering what i am doing wrong. When I use the listview like this:
<asp:XmlDataSource
id="XmlSourceT2"
DataFile="/App_Data/cl.xml"
XPath="courseList/category_background/security/tg1"
runat="server" />
<asp:ListView ID="ListView_tg" runat="server" DataSourceID="XmlSourceT2">
<LayoutTemplate> <ul> <asp:PlaceHolder ID="itemPlaceHolder" runat="server" /> </ul > </LayoutTemplate>
<EmptyDataTemplate> <li>Error!</li> </EmptyDataTemplate>
<ItemTemplate>
<li><%# Eval("@desc") %> </li>
</ItemTemplate>
</asp:ListView>
xml file:
<security>
<tg desc="some stuff #1." />
<tg desc="some stuff #2." />
<tg desc="some stuff #3." />
........
</security>
All three items will show. But if i chose to use the XPATH as follows:
<asp:XmlDataSource
id="XmlSourceT2"
DataFile="/App_Data/cl.xml"
XPath="courseList/category_background/security"
runat="server" />
<li><%# XPath("tg1/@desc") %> </li>
Only the top list item shows - the other 2 are not listed.
Cheers
Tania