Community-Credit.com | NonProfitWays.com | SOAPitstop.com   Skin:   
      User: Not logged in 
Home
Newsletter Signup
XSLT Library
Latest XML Blogs
Featured Examples
Presentations
Featured Articles
Book Chapters
Training Courses
Events
NewsGroups
 
Discussions
Examples
Tutorials
Tools
Articles
Resources
Websites
 
Sign In
My Profile
My Articles
My Examples
My Favorites
My Resources
Add a Resource
Logout
 
About Me
My Blog
HeadGeek Articles
Talking Portfolio
Resume
Pictures
World Trip Pics

Is ATOM really better than RSS?
Author: Sonu Kapoor
Published: 12/7/2004 12:00 AM
Category: XML
Summary: In this article I will discuss with you some of my views about Atom and RSS. We will see some differences between these both and some small tests.

 

What is Atom?

Atom is a publication feed to make news and content available of your Website easily accessible to others. It is simply a XML file with some predefined tags. Usually an Atom feed is visible on many websites with a small blue icon and the caption “Atom”. It looks like this: Atom It is just used for the visual identification and not really compulsary. There are already many newsreaders which supports the use of an Atom feed: NewsMonster, NewzCrawler, RSSOWL and much more.

Some differences between Atom and RSS

If we have already a feed to publish news and content then why do we need another one? Well, Atom was created to take the full advantage of XML and is well defined. A disadvantage of RSS is the compatibility - in instance you can’t have a title in tags. As the author of the reblogger application I had to deal with several RSS feeds. While working with that I saw that some feeds used tags at the beginning of a title and at ending of the title. Something like this: . When I tried to print this title to the user in the browser it was simply converted to a HTML tag and therefore the title was simply empty in that case. The other problem is that many newsreaders won’t recognize that as a title, they will think that this is a tag and simply don’t display it at all. An another problem is that the pubDate format is in RFC-822 format, however XML-RPC only supports ISO-8601. You can read more about the date issue here. That’s where Atom came in. Atom is created to avoid the mistakes done by RSS. The tags used by both feeds are similar but still different. In the following table I list few changes between the both feeds. The left side shows how the tags are called in RSS 2.0 and the right side shows how they are called in Atom 0.3.

RSS 2.0

Atom 0.3

Does not exist in Atom feed. The tags inside a channel tag on a rss feed are simply implemented in the inner of the feed tag.

In Atom you can have multiple Authors.

(RFC-822 format)

(ISO-8601 format)

Sample of an Atom feed

<feed version="0.3" xmlns="http://purl.org/atom/ns#">
<title>dive into mark</title>
<link rel="alternate" type="text/html" href="http://diveintomark.org/"/>
<modified>2003-12-13T18:30:02Z</modified>
<author>
	<name>Mark Pilgrim</name>
</author>
<entry>
	<title>Atom 0.3 snapshot</title>
	<link rel="alternate" type="text/html" href="http://diveintomark.org/2003/12/13/atom03"/>
	<id>tag:diveintomark.org,2003:3.2397</id>
	<issued>2003-12-13T08:29:29-04:00</issued>		
	<modified>2003-12-13T18:30:02Z</modified>
	</entry>
</feed>

Simple RSS feed

<rss version="2.0">
<channel>
	<title>Latest news</title>
	<link>http://KapoorSolutions.com</link>
	<description>Software developement</description>
	<item>
		<title>new1</title>
		<description>description of news1</description>
	</item>
</channel>
</rss>

Testing the RSS sheet

I have created an account with newsgator.com to test a rss sheets. The following screenshot shows that two there are two items in one feed.

However the first item one doesn’t contain any title. Can you see why that happens? Its because I used the a rss feed which has a tag in the title tag. Here is the rss feed:

RSS feed

<rss version="2.0">			
<channel>
	<title>RSS Test</title>
	<link>http://KapoorSolutions.com</link>
	<description>Software developement</description>
	<item>
		<title><without_title/></title>
		<description>description of news1</description>
	</item>
	<item>
		<title>with title</title>
		<description>description of news1</description>
	</item>
</channel>
</rss>

Testing the Atom feed

The following screenshot shows an atom which converts the tag in the title tag to the html.

Atom feed

<?xml version="1.0" encoding="utf-8"?>
<feed version="0.3" xmlns="http://purl.org/atom/ns#">			
<title>Atom Test</title>
	<link rel="alternate" type="text/html" href="http://example.org/"/>		
	<modified>2004-05-07T12:29:29Z</modified>
	<id>tag:diveintomark.org,2004-05-07:/tests/feed/escaping/blink</id>
	<entry>
		<title type="application/xhtml+xml" mode="xml">	
		<div xmlns="http://www.w3.org/1999/xhtml">History of the <blink>tag</div></title>
		<link rel="alternate" type="text/html" href="http://example.org/3"/>	
		<id>tag:example.org,2004-05-07:/tests/feed/escaping/blink/3</id>	
		<issued>2004-05-07T12:29:29Z</issued>	
		<modified>2004-05-07T12:29:29Z</modified>	
	</entry>
</feed>

Related Links:

Atom Syntax Mailing List
Embedding Atom elements in your RSS 2.0 feed
Sharing Web Content Using RSS
The Atom Syndication Format (draft-ietf-atompub-format-03)
Dive into Mark
The Atom API
Atom.NET


 

 
Fans of "The Office"
Dwight Bobbleheads are here!
  “It's me! I'm the bobblehead! Yes!”



Advertise on XMLPitstop

Advertise on XMLPitstop


EggHead Cafe
Web Servicee development
DotNetSlackers
Ink refills
email to fax
web conferencing
help desk outsourcing
chicago web design
Alojamiento de Web
Cheap Web Hosting
Hidden Security Cameras
Donna karan sunglasses
Video Surveillance
VoIP Internettelefonie DE

4,136 Total Members
9 members(last 30 days)
1 members(last 7 days)
0 members(today)

1,948 Total Discussions
0 Posts(last 30 days)
0 Posts(last 7 days)
0 Posts(today)

47,487 Total Blog Posts
0 Blogs(last 30 days)
0 Blogs(last 7 days)
0 Blogs(today)

8,699 Newsgroup Posts
0 Posts(last 30 days)
0 Posts(last 7 days)
0 Posts(today)

14,139 Total Resources
1 Resources(last 30 days)
0 Resources(last 7 days)
0 Resources(today)


 

David Silverlight's XMLPitstop.com| 2801 Florida Ave #225|Miami, FL 33133|Ph:305-447-1139