How can I get started making a C# RSS Reader?

C#XmlRss

C# Problem Overview


I have been wanting to make a RSS reader for a while now (just for fun), but I don't have the slightest idea of where to start. I don't understand anything about RSS. Are there any good tutorials on RSS and how to implement it in an application (not a tutorial on how to make a RSS reader, that would be too easy).

C# Solutions


Solution 1 - C#

See

http://msdn.microsoft.com/en-us/library/bb943474.aspx

http://msdn.microsoft.com/en-us/library/system.servicemodel.syndication.syndicationfeed.aspx

http://msdn.microsoft.com/en-us/library/bb943480.aspx

Basically there is a lot of stuff in the .Net 3.5 framework that does the grunt-work of parsing and representing feeds; it's not hard to write a 30-line app that takes in a feed URL and downloads the feed and prints the title and author of all the items, for example. (Works for RSS 2.0 (not others!) or Atom.)

Solution 2 - C#

If you are focusing on creating an RSS Reader and not on RSS parsing logic, you might want to delegate creation/reading RSS feeds using this free RSS Library called Argotic on CodePlex.com

Solution 3 - C#

As another poster recommended, the SyndicationFeed class and Argotic are the best alternatives.

If performance is an issue, the SyndicationFeed class will be much better. I benchmarked it as being about 9 times faster than Argotic on my hardware.

The problem I've had with the SyndicationFeed class has been its ability to successfully parse any random feed from the 'net. It fails with an XmlException surprisingly often.

For my uses, I'm sticking with Argotic. After all, it is open source, so I can always make changes if I need to.

Solution 4 - C#

I suggest you use this

> RSS.NET is an open-source .NET class library for RSS feeds. It provides a reusable object model for parsing and writing RSS feeds. It is fully compatible with RSS versions 0.90, 0.91, 0.92, and 2.0.1, implementing all constructs.

Since standard syndication feed does not support other versions of rss.

Solution 5 - C#

You need to work with the RSS XML specification: <http://cyber.law.harvard.edu/rss/rss.html>

Solution 6 - C#

If you write a full featured reader without using any library, also think that there are ATOM feeds to parse.

Solution 7 - C#

RSS itself is really simple. Just an XML description of a channel, and a list of items on that channel (possibly with files attached to each item). Keeping track of updates is a little tricky, and managing encodings and post times/dates is tricky too though. The real nightmare is all the different "interpretations" of the RSS format that different sites use. If you're really writing a feed reader, you might want to start with parsing Atom, as it's a more standardised format, and might get you further faster, with a good design to branch off into RSS from. But really, you should just use an RSS parsing library -- preferably the most compatible one available (but don't pay for an RSS library; they're common enough).

Solution 8 - C#

RSS is an XML dialect, so if you know XML, you have part of the problem solved. If you want a start on your project, consider looking at the open source projects already out there:

http://www.codeplex.com/site/search?projectSearchText=RSS%20Reader

CodePlex (above) is a good place to start, as the majority of the projects will be in C#.

Solution 9 - C#

Consider reading the source code for RSS Bandit, which is a C# Winforms (possibly soon WPF) RSS Reader.

You should get some good ideas by just stepping through the application.

Solution 10 - C#

I've been working with RSS quite a bit and have found that ATOM feeds are typically easier to parse using the RssSyndication class. For RSS 2.0 specifications, if the feed is in fact valid, then it's just as easy to load an XDocument from the URI, and parse the data as needed.

Solution 11 - C#

If you cant use System.ServiceModel.Syndication.Syndicationfeed, for example because you are using a PCL (Portable Class Library). I wrote one : FeedParserPCL. You can find it on NuGet.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionKrednsView Question on Stackoverflow
Solution 1 - C#BrianView Answer on Stackoverflow
Solution 2 - C#dance2dieView Answer on Stackoverflow
Solution 3 - C#scottmView Answer on Stackoverflow
Solution 4 - C#Lukas Ĺ alkauskasView Answer on Stackoverflow
Solution 5 - C#Marco BettioloView Answer on Stackoverflow
Solution 6 - C#Julien RoncagliaView Answer on Stackoverflow
Solution 7 - C#Lee BView Answer on Stackoverflow
Solution 8 - C#Gregory A BeamerView Answer on Stackoverflow
Solution 9 - C#JafinView Answer on Stackoverflow
Solution 10 - C#bkingdevView Answer on Stackoverflow
Solution 11 - C#aloisdgView Answer on Stackoverflow