Using LINQ With Syndication Feeds
Scott Guthrie just posted a great article on how to use LINQ to XML to build a simple RSS reader. Another namespace to checkout in .NET 3.5 is the System.ServiceModel.Syndication namespace. This namespace includes an object model for producing and consuming RSS/Atom feeds. For example, I can easily take Scott's RSS "new posts" snippet and use either ATOM (1.0) or RSS (2.0) without changing any code. Here's an example with his Atom feed:
var feed = SyndicationFeed.Load(new Uri("http://weblogs.asp.net/scottgu/atom.aspx"));
var newPosts = from item in feed.Items
where (DateTime.Now - item.LastUpdatedTime).Days < 7
select item;
Simply switch out the Uri to the RSS endpoint and you still have all the strongly typed properties of the feed!