Here’s an easy way to expose feeds using the new System.ServiceModel.Syndication namespace.
Instead of dealing with XmlDocument the Rss20FeedFormatter class will be responsible to format the correct xml content for our feed.
The feed object is composed by properties like the author and the language but, more important, by the list of the feed categories and the items (posts, articles etc).
Here’s how the page will look:
Source code: RssGenerator sample