How to upgrade Atom 0.3 feeds on the fly with a custom XmlReader for use with WCF Syndication APIs

Even now that Atom 1.0 has been approved and official for some time, there's a feed every now and then that still uses Atom 0.3 (i.e. Google News! http://news.google.com/?ned=us&topic=w&output=atom).

The .NET APIs for feeds, System.ServiceModel.Syndication, handles RSS 2.0 and Atom 1.0 fine, and you just have to make a single call to load a feed regardless of its format:

SyndicationFeed.Load(xmlReader);

I searched the web looking for an easy answer, but I couldn't find any that would let me seamlessly plug into the .NET APIs to do the feed format upgrade on the fly. So I put one together myself :)...

Read full article

No Comments