Main Page
 The gatekeeper of reality is
 quantified imagination.

Stay notified when site changes by adding your email address:

Your Email:

Bookmark and Share
Email Notification
Project "ASP.Net 3.5 RSS Feed Reader"
The purpose of this project is to demonstrate how to create a simple RSS feed reader using an ASPX page.

NOTE: If you are reading from something other than the stream (shown) you may need to try the following to resolve "Illegal Characters In Path" errors:
rssDoc.Load(new StringReader(rssFeed))

<%@ Import Namespace="System" %>
<%@ Import Namespace="System.IO" %>
<%@ Import Namespace="System.Xml" %>
<%@ Import Namespace="System.Net" %>
<%@ Import Namespace="System.Data" %>
<script runat="server">
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs)
Dim rssStream As Stream
Dim myRequest As WebRequest = WebRequest.Create("")
myRequest.Method = "GET"
myRequest.ContentType = "text/xml"
Dim myResponse As WebResponse = myRequest.GetResponse()
rssStream = myResponse.GetResponseStream()
Dim rssDoc As New XmlDocument()
Dim rssItems As XmlNodeList = rssDoc.SelectNodes("rss/channel/item")
Dim title As String, link As String, description As String
For X As Integer = 0 TO rssItems.Count - 1
title = rssItems.Item(X).SelectSingleNode("title").InnerText
Catch ex As Exception
title = ""
End Try
link = rssItems.Item(X).SelectSingleNode("link").InnerText
Catch ex As Exception
link = ""
End Try
description = rssItems.Item(X).SelectSingleNode("description").InnerText
Catch ex As Exception
description = ""
End Try
Response.Write ("Title = " & title & "<br />Link = " & link & "<br />Description = " & description & "<br />")
Catch ex As Exception
End Try
End Sub
About Joe