views:

676

answers:

1

I am trying to read a handful of Rss / Atom feeds with

var synFeed = SyndicationFeed.Load(reader);

But it throws on the slightest problem. For instance, when one Item contains a few HTML tags in the description field, it's not possible to read the Feed at all. It also doesn't like the RDF tags from for instance SlashDot.

Note that Load() is a static method w/o overloads.

Is there another way to import a Feed through using System.ServiceModel.Syndication.SyndicationFeed? I couldn't find it.

Btw: I am using C# 4, but any Framework 3.5 answers are good too. And I know about Argotic and other libraries, just want to see how usable the Syndication framework is first.

+4  A: 

Henk, the reason you can't read the feeds from Slashdot is because it uses RSS 1.0. The .NET Framework only includes built-in support for RSS 2.0 and Atom 1.0 feeds.

However, it is possible to create your own class that extends the SyndicationFeedFormatter class and parses RSS 1.0 feeds. Check out my article on this topic for a description of the process along with C# code for such a class: Syndicating and Consuming RSS 1.0 (RDF) Feeds in ASP.NET 3.5.

Scott Mitchell
OK, looks like a nice article.
Henk Holterman