Structure of the Atom Feed
Here is how the XML of a good Atom feed should look:
|
<?xml version="1.0" encoding="UTF-8"?> <feed xmlns:g="http://base.google.com/ns/1.0" xmlns:thr="http://purl.org/syndication/thread/1.0" xmlns="http://www.w3.org/2005/Atom" xml:lang="en-us"> <id>http://viatropos.com/blog/</id> <uri>http://viatropos.com</uri> <title><![CDATA[Viatropos' Feed]]></title> <subtitle type="xhtml"> <div xmlns="http://www.w3.org/1999/xhtml"> <p class="vcard"> Thoughts and musings of <a href="http://viatropos.com/" class="url fn">Lance Pollard</a>, a <span class="title">programmer</span> living in <span class="adr"><span class="locality">Berkeley</span>, <abbr class="region" title="California">CA</abbr></span>. </p> </div> </subtitle> <link href="http://viatropos.com/" rel="self" type="application/atom+xml"/> <link href="http://viatropos.com/blog/" rel="alternate" type="text/html"/> <icon>http://viatropos.com/images/icons/viatropos-favicon.png</icon> <logo>http://viatropos.com/images/icons/viatropos-site-icon.png</logo> <author> <name>Lance Pollard</name> <email>[email protected]</email> <uri>http://viatropos.com/</uri> </author> <rights type="xhtml"> <div xmlns="http://www.w3.org/1999/xhtml"> Copyright © 2010 <a href="http://viatropos.com/">Lance Pollard</a>. <a href="http://creativecommons.org/licenses/by-sa/3.0/" rel="license">Some rights reserved (CC BY-SA 3.0).</a> </div> </rights> <entry> <id>http://viatropos.com/blog/optimizing-your-blogs-rss-and-atom-feeds</id> <title type="xhtml"> <div xmlns="http://www.w3.org/1999/xhtml">Optimizing Your Blog's RSS and Atom Feeds</div> </title> <link href="http://viatropos.com/blog/optimizing-your-blogs-rss-and-atom-feeds" rel="alternate"/> <published>2010-07-30T00:00:00Z</published> <updated>2010-07-30T00:00:00Z</updated> <author> <name>Lance Pollard</name> </author> <category label="Feed" term="feed" scheme="http://viatropos.com/tags/"/> <category label="Rss" term="rss" scheme="http://viatropos.com/tags/"/> <category label="Atom" term="atom" scheme="http://viatropos.com/tags/"/> <category label="Syndication" term="syndication" scheme="http://viatropos.com/tags/"/> <category label="Xml" term="xml" scheme="http://viatropos.com/tags/"/> <summary type="xhtml"> <div xmlns="http://www.w3.org/1999/xhtml">Feeds are one of the most important parts of publicizing and marketing your site. But if youâÂÂre building a site from scratch, knowing everything a feed should include is a lot to grasp. This outl...</div> </summary> <content type="xhtml"> <div xmlns="http://www.w3.org/1999/xhtml"> <h1>Optimizing Your Blog's RSS and Atom Feeds</h1> ... </div> </content> </entry> </feed>
|
Key Parts of the Atom Feed
Atom Feed Head Elements
- title
- subtitle
- author
- rights
- icon
- logo
- link to self
- link to html version
Atom Feed Entry Elements
- title
- summary
- link to html version
- content
- categories
Here is how the XML of a solid RSS feed should look:
|
<?xml version="1.0"?> <rss xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" version="2.0"> <channel> <title>Viatropos' Feed</title> <link>http://viatropos.com</link> <description>Creativity and Emergence</description> <lastBuildDate>Fri, 30 Jul 2010 16:04:07 -0700</lastBuildDate> <image> <url>http://viatropos.com/images/icons/viatropos-site-icon.png</url> <title>Viatropos' Feed</title> <link>http://viatropos.com/</link> <description>Creativity and Emergence</description> </image> <item> <title>Optimizing Your Blog's RSS and Atom Feeds</title> <link>http://viatropos.com/blog/optimizing-your-blogs-rss-and-atom-feeds</link> <description><![CDATA[Feeds are one of the most important parts of publicizing and marketing your site. But if you’re building a site from scratch, knowing everything a feed should include is a lot to grasp. This outl...]]></description> <content:encoded>Feeds are one of the most important parts of publicizing and marketing your site. But if you&#8217;re building a site from scratch, knowing everything a feed should include is a lot to grasp. This outl...</content:encoded> <guid>http://viatropos.com/blog/optimizing-your-blogs-rss-and-atom-feeds</guid> <author>Lance Pollard</author> <category><![CDATA[feed]]></category> <category><![CDATA[rss]]></category> <category><![CDATA[atom]]></category> <category><![CDATA[syndication]]></category> <category><![CDATA[xml]]></category> </item> </channel> </rss>
|
Resources