Tuesday, May 26, 2009

Differences between Rss and Atom

Here are some of the important differences between RSS and Atom XML structure.
This would help you while programatically reading the RSS / Atom of a blog.

RSS Atom Remarks
rss - check for this to differentiate between RSS/Atom
channel feed  
title title  
link link if you are trying to read the link… check the rel attribute of the link value to alternate and corresponding href attribute value. This is very important.
description subtitle content  value to be read instead.
language - Atom uses standard xml:lang attribute
copyright rights  
webMaster -  
managingEditor author or contributor  
pubDate published (in entry) Atom has no feed-level equivalent
lastBuildDate (in channel) updated RSS has no item-level equivalent
category category Read term attribute value.
generator generator  
docs -  
cloud -  
ttl - <ttl> is problematic, prefer HTTP 1.1 cache control
image logo Atom recommends 2:1 aspect ratio
- icon As in favicon.ico
rating -  
textInput -  
skipHours -  
skipDays -  
item entry  
author author  
- contributor  
description summary and/or content depending on whether full content is provided
comments -  
enclosure - rel="enclosure" on <link> in Atom
guid id  
source - rel="via" on <link> in Atom
- source Container for feed-level metadata to support aggregation

1 comment:

Anonymous said...

Searching for these difference from a long time to include in RSS Aggregator. Well written.

Thanks for your time.