Awesome ASP.NET 2.0 RSS Tool-Kit Released
page 3 of 8
by Scott Guthrie
Feedback
Average Rating: This article has not yet been rated.
Views (Total / Last 10 Days): 34129/ 84

Strongly Typed RSS API Support

 

The RSS Toolkit also adds support for creating a strongly-typed object model over a remote RSS feed.  This allows you to program against RSS data in a clean, easy way.  You can do this one of two ways:

1) Using the rsssdl.exe utility that ships with the toolkit.  This is a command-line tool that generates a strongly-typed class library based on a provided RSS URL feed (sort of like wsdl.exe does for web-services).  For example, I could use it against my ScottGu RSS blog feed like so to generate a Scottgu.cs file containing C# classes that provide a strongly-typed object model around it:

Figure 7

I could then add the generated “scottgu.cs” file to my project and instantiate and use the class framework to programmatically databind the RSS channel’s items against a GridView (note that each of the Items is strongly typed as a "ScottGuChannelItem" -- and has a strongly-typed object model based on the schema of the RSS feed):

Listing 2

ScottGuChannel channel =ScottGuChannel.LoadChannel();
GridView1.DataSource = channel.Items;
GridView1.DataBind();

or alternatively:

2) The RSS toolkit also ships with a new ASP.NET 2.0 build-provider that allows you to declaratively add .rssdl file definitions in your app_code directory.  For example like so:

Listing 3

<rssdl>
    <rss name="ScottGu"url="http://weblogs.asp.net/scottgu/rss.aspx" />
</rssdl>

This will then automatically generate and build a RSS channel proxy into your project for you to use (no command line tool usage required).


View Entire Article

User Comments

Title: Jeff Paul Scam   
Name: Jeff Paul Scam
Date: 2009-03-04 8:28:42 PM
Comment:
This post gave us a major Brainstorm session of all the possibilities we can utilize on our blog.
Title: How to download the updated feeds?   
Name: Abhilash
Date: 2009-02-26 4:06:39 AM
Comment:
Hi,
Article was nice. I must say.

Do you missed something additional?I mean...how we download the updated feeds only?

Is such a feature missing in it ?

Looking forward for your response.
Thankz.
Title: Any VB   
Name: Stephanie
Date: 2008-05-21 10:20:24 AM
Comment:
I am looking for a VB version

Product Spotlight
Product Spotlight 





Community Advice: ASP | SQL | XML | Regular Expressions | Windows


©Copyright 1998-2024 ASPAlliance.com  |  Page Processed at 2024-04-25 10:08:57 AM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search