7.2. Atom

Atom is the newest entry on the syndication scene. Since its inception in mid-2003, Atom has received quite a bit of coverage and usage. Atom, unlike RSS, is a strict specification. One of the problems of the RSS specification is the lack of information on how a developer handles HTML markup in its elements. Atom's specification addresses this issue and gives developers strict rules they must follow, as well as a host of new features, enabling developers to choose the content type of an element and specify attributes that designate how a specific element should be handled. With such features, it is no wonder powerhouses like Google and Movable Type are getting behind Atom.

Atom resembles RSS in the sense that they both have the same data constructs. Most of Atom's element names differ from RSS, and the document structure is slightly different:

<?xml version="1.0" encoding="iso-8859-1"?>

<feed version="1.0" xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
    <title>My Revenge</title>
    <link rel="alternate" type="text/html" href="http://sithboys.com" />
    <modified>2006-06-30T15:51:21-06:00</modified>

<tagline>Dedicated to having our revenge</tagline>
    <id>tag:sithboys.com</id>
    <copyright>Copyright (c) 2006</copyright>
    <entry>
        <title>At last!</title>
        <link rel="alternate" type="text/html" href="
            http://sithboys.com/atlast.htm" />
        <modified>2005-06-30T15:51:21-06:00</modified>
        <issued>2005-06-30T15:51:21-06:00</issued>
        <id>tag:sithboys.com/atlast</id>
        <author>
            <name>Darth Maul</name>
        </author>
        <content type="text/html" xml:lang="en"
          xml:base="http://sithboys.com">
            At last we will reveal ourselves to the Jedi. At last we will
            have our revenge.
        </content>
    </entry>
</feed>

According to the Atom specification, all elements in the Atom format must reside in the http://www.w3.org/2005/Atom namespace, or else many parsers will not parse the feed. All site-defining elements exist as direct children to the document element. An Atom feed can also contain many <entry/> elements, resembling the <item/> elements of an RSS feed.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset