ASP.NET(vb.net) & XML RSS Feed - The in this article we will show example scripts ASP.NET how to read XML RSS Feed.
ShotDev Focus:
- ASP.NET(vb.net) & XML RSS Feed
Example
AspNetXMLFeed.aspx
<%@ Import Namespace="System.Data"%> <%@ Import Namespace="System.XML"%> <%@ Page Language="VB" %> <script runat="server"> Sub Page_Load(sender As Object, e As EventArgs) Dim strURL As String Dim ds As New DataSet() strURL = Server.MapPath("XML/news.xml") 'strURL = "http://www.shotdev.com/news.xml" '*** Feed From Other Website ***' Dim reader as XmlTextReader = New XmlTextReader(strURL) ds.ReadXml(reader) '*** BindData to Repeater ***' myRepeater.DataSource = ds myRepeater.DataBind() ds = Nothing End Sub </script> <html> <head> <title>ShotDev.Com Tutorial</title> </head> <body> <form id="form1" runat="server"> <asp:Repeater id="myRepeater" runat="server"> <ItemTemplate> <a href="<%#Container.DataItem("Link") %>" target="blank"><%#Container.DataItem("Subject") %></a><br /> </ItemTemplate> </asp:Repeater> </form> </body> </html>
Screenshot