How do I determine if a Feed is RSS or Atom in .NET with C#?
Posted on 2011-02-18
I have a list of feeds that a user provides and I do not know in advance which feed is which (RSS or Atom).
I would like to figure out how to check which format each feed is because I'm running into issues where certain SyndicationItem item's are not assecible depending on the feed type.
Works with Atom to pull off the Sumamry, but if I tried this for RSS I get an 'Object reference not set to an instance of an object' .error, but this then works:
where 'item' for both is the variable name for the SyndicationItem
So, I need to check which type of feed I'm reading in to know which summary tag to use...