Mega Code Archive

 
Categories / ASP.Net / XML
 

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>