Repeater控件绑定XmlDataSource数据源

<asp:Repeater ID="xml1" runat="server" DataSourceID="XmlDataSource1"> <ItemTemplate> <ul> <li style="color: Blue;">《<%# Server.HtmlEncode(XPath("name").ToString()) %>》</li> <li><%# Server.HtmlEncode(XPath("mark").ToString())%></li> <li><b>数量:</b><%# XPath("quantity")%>&nbsp;&nbsp;<b>价格:</b><%# XPath("price")%>&nbsp;&nbsp;<b>作者:</b><%# XPath("author")%></li> </ul> <hr /> </ItemTemplate></asp:Repeater><asp:XmlDataSource runat="server" DataFile="~/data/test.xml"></asp:XmlDataSource>

相关文章

php输出xml格式字符串
J2ME Mobile 3D入门教程系列文章之一
XML轻松学习手册
XML入门的常见问题(一)
XML入门的常见问题(三)
XML轻松学习手册(2)XML概念