Simple Tutorial

Jun 28, 2007 at 9:30 PM

This simple tutorial will use the FeedDotNet API to parse and display an rss feed in a data definition list


string feedUri = "http://feeds.feedburner.com/getanewbrowser";
FeedDotNet.Common.Feed _feed = FeedDotNet.FeedReader.Read(feedUri);

StringBuilder sb = new StringBuilder();

sb.Append("<dl>");

foreach (FeedDotNet.Common.FeedItem _item in _feed.Items)
{
sb.Append("<dt>" + _item.Title + "</dt>");
sb.Append("<dd>" + _item.Content + "</dd>");
}

sb.Append("</dl>");

Response.Write(sb.ToString());
Jul 2, 2007 at 3:20 PM
VB version for anyone the vb'ers out there

Dim feedUri As String = "http://feeds.feedburner.com/getanewbrowser"
Dim _feed As FeedDotNet.Common.Feed = FeedDotNet.FeedReader.Read(feedUri)

Dim sb As New StringBuilder
sb.Append("<dl>")

For Each _item As FeedDotNet.Common.FeedItem In _feed.Items
sb.Append("<dt>" + _item.Title + "</dt>")
sb.Append("<dd>" + _item.Content + "</dd>")
sb.Append("<dd>" + _item.Published.ToString + "</dd>")
sb.Append("<dd>-" + _item.Guid.Id + "</dd>")
Next
sb.Append("</dl>")
Response.Write(sb.ToString())