This project has moved. For the latest updates, please go here.
To enable the default handling of .rss or .rssdl files in the App_Code directory you would using a web.config like this [leaving out the standard stuff]:
<?xml version="1.0"?>
        <compilation debug="true">
                <add extension=".rss" type="RssToolkit.Rss.CodeGeneration.RssBuildProvider,RssToolkit"/>
                <add extension=".rssdl" type="RssToolkit.Rss.CodeGeneration.RssdlBuildProvider,RssToolkit"/>
        <add key="defaultRssTtl" value="10"/>
        <add key="rssTempDir" value="~\App_Data"/>

This would cause any files in the App_Code directory with an extension of .rss to be handled as-if they were an cached XML copy of an RSS feed and a matching code file would be generated. The language of the generated wrapper code will match the default language of the Web Site Project or Web Application Project (as appropriate). The web.config sample above will also cause any file with an extension of .rssdl to be treated as-if it was an XML list of RSS feed URL(s). For each mentioned feed in the .rssdl file, the feed will be fetched (if a URL) or read (if a file) at compile-time and the code generated. An example .rssdl file looks like this:
    <rss name="YouTube" url="" />
    <rss name="MSNBC" url="" />

For this example, two strongly-typed classes would be generated at web site compile-time. The first would be the YouTubeRss class which will expose all the properties of the feed, including the enclosures and namespaced-items from Yahoo's search schema. The second would be the MSNBCRss class which would expose the properties of the MSNBC feed. In both cases, the default URL for the class would be the one specified in the .rssdl file, but you can point the class at a difference (compatible) URL at runtime as desired. The classes are otherwise exactly the same as those generated by the RssDl.exe command-line compiler (see: Consuming Feeds with RssDll Compiler).

Last edited Jun 15, 2007 at 11:26 PM by IDisposable, version 2


No comments yet.