Using the XmlDataSource control to consume an RSS feed : XmlDataSource « XML « ASP.Net






Using the XmlDataSource control to consume an RSS feed

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ Page Language="C#" %>
<script runat="server">

</script>

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>Untitled Page</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:XmlDataSource ID="XmlDataSource1" 
                           Runat="server"
                           DataFile="http://msdn.microsoft.com/rss.xml"
                           XPath="rss/channel/item">
        </asp:XmlDataSource>

    </div>
    </form>
</body>
</html>

 








Related examples in the same category

1.asp:Xml datasource
2.Caching XML Data in an XmlDataSource Control
3.Create asp XmlDataSource
4.Binding XML Data from an XmlDataSource Control
5.Using Inline XML Data in an XmlDataSource Control
6.Binding XML Data from Other Sources
7.Updating Data through XmlDataSource Control
8.Programmatically Creating an XmlDataSource Control
9.Handling XmlDataSource Events
10.Fill XmlDataSource with your code
11.XmlDataSource and XML document
12.Use ItemTemplate and XPath to display data from XmlDataSource
13.Enter an XML filename or raw XML starting with