gives you the ability to databind to an RSS/Atom/RDF/OPML feed. It is derived from
and has the ability serve as a data source to any data-bound controls. The control has complete Designer support for configuring the datasource feed.
Consuming With RssDataSource
Using RssDocument class
This base-level class can be used to consume a feed in a weak-typed form (much the way Version 1.0 of the RssToolkit worked) where the feed dynamically determines the columns available. You can use this to either consume or publish feed in code-behind or even
in a non-web situation. You can load a feed from a file, from a URL. from a
or from a String
. The feed can be rendered out in XML form (as an RSS/Atom or PDF
) or can be rendered to a
that contains a DataTable
for each channel and a
for each item. The columns of each
are determined by the feed's elements.
Consuming with RssDocument
Using compile-time generated classes
One of the best features of the ASP.Net RSS Toolkit is the ability to generate a class that gives strong-typed properties for the elements in each feed item. This allows you to programatically examine and manipulate the properties for the feed. If the feed
uses external schema definitions for custom extension properties such as the Media Rss by Yahoo
, they will be fully handled as well. The advantage of this approach is that you don't have to write code to handle the proper serialization of
(s) or even nested element types like those from the Yahoo Media Rss definitions. Additionally, the feed source can be a URL (served from some web site) or a file (cached from
a previous fetch, or even just hand synthesized to reflect a storage). In fact, a feed file could be used as a self-created strong-typed configuration file.
There are two ways that these strong-typed classes can be generated:
The RssDl.exe command-line compiler
Consuming Feeds with RssDll Compiler
The final way to consume feeds works only with Web Site Projects or Web Application Projects. By adding a Build Provider
you can have the RssToolkit automatically handle the generation of the strong-typed classed for the feed(s).
Consuming Feeds with a Build Provider