Kieron's Blog

RSS feed

This little piece of code I created shown below will allow you to use XPath to traverse the XML from an RSS feed and load the contents of the feed on your web page.

Code In-Front:

<%@ Page Language=”VB” AutoEventWireup=”false” CodeFile=”RSSExternal.aspx.vb” Inherits=”RSSExternal” %>

<!DOCTYPE html>

<html xmlns=””>
<head runat=”server”>
<form id=”form1″ runat=”server”>


Code Behind:

Imports System.Xml

Imports System.Xml.XPath
Imports System.Xml.Linq
Imports System.Linq
Imports System.Collections.Generic
Partial Class RSSExternal
Inherits System.Web.UI.Page

Public Class RSSFeed

Public Title As String
Public Description As String
Public Location As String
Public From As String
Public Till As String
Public Link As String
Public ImageSrc As String
Public ImageTitle As String
Public ImageLink As String

End Class

Protected Sub form1_Load(sender As Object, e As EventArgs) Handles form1.Load

If (Not Request.QueryString(“type”) Is Nothing) Then

Dim feedType As String = Request.QueryString(“type”)


View original post 93 more words