Sample Applications

Topics: Developer Forum, User Forum
Dec 27, 2007 at 1:49 PM
Hello all. I just discovered this neat library. I wonder if there are some sample applications. Right now I'm particularly interested in seeing some samples of the RSS (distilled vs. non-distilled) classes. But would also like to see some samples of the rest of the library.

Jan 2, 2008 at 4:35 AM
Hey Trevor, there are a few samples on codeproject:

Although I certainly would like to create many more samples and documentation, I just haven't had time.

For RSS, the Atom, RSS, and OPML readers and writers are one of the oldest parts of the code (along with ScreenScraper), although they are still pretty functional. The idea behing the distilled vs non-distilled was to try to create common data across both Atom and RSS (distilled), whereas non-distilled has protocol specific data. So the idea is that if you want to deal at the simpler (distilled) level, after getting back the IFeed, you just call Distill() on it.

Here is an example:

IFeed channel = new FeedParser().CreateFeed<IFeed>(new Uri(""), false);
IDistilledFeed feed = channel.Distill();

You can also create RSS, Atom, and OPML feeds quite easily with the serializer:

FeedSerializer.SerializeToString(...IFeed object with data..., SerializeType.Rss2)

Finally, here is an example of getting an Opml feed, and then serializing it back out (you could make modifications in the interim):

IOpmlFeed opml = new OpmlParser().CreateFeed<IOpmlFeed>("");

If you're looking to do something in particular, feel free to ask...