â-º ATOM is an IETF standard while RSS is not
â-º ATOM feeds explicitly indicates the content while the browser is left to figure out whether the RSS feed contains plain text or escaped HTML
â-º ATOM code is modular and reusable while RSS code is not
â-º RSS still holds dominance in the syndication format due to its head start and popularity
There are 2 document types defined for Atom feed files:
► Atom Feed Document - Representing an Atom feed, including metadata about the feed, and some or all of the entries associated with it. Its root element is the <feed> element.
► Atom Entry Document - Representing only one Atom entry. Its root element is the <entry> element.
Yes. Atom feed files are XML (eXtensible Markup Language) documents. Atom feed files must be well-formed XML documents, respecting the following XML rules.
► The first line must be the "xml" processing instruction with "version" and "encoding" attributes.
► There must be only one root element in a single XML document.
► All elements must be closed with the closing tags.
► One element can be nested inside another element.
► One element can not be partially nested inside another element.
► Element attribute values must be quoted with double quotes.
► Special characters in element attribute values or element contents must be protected using entities, like < and >.
When you use a FireFox browser visiting a Web page that has an Atom feed define, FireFox will display a "live bookmark" icon in the status bar. You can click the "live bookmark" to add the Atom feed to the bookmark list.
If you want to see FireFox's "live bookmark" icon, you can use a FireFox browser to visit the "webmaster.html" page created in previous tutorials. You will the "live bookmark" icon displayed in the status bar at the right bottom corner as shown in the picture below:
FireFox Live Bookmark Icon
Clicking on the "live bookmark" icon, the Atom feed file "atom.xml" will show up to allow you to select and add to the bookmark list.
One way to tell Web browsers that your Web pages have Atom Feed files is to add a "link" tag in the header section of your Web pages. The "link" tag defines a "link" element with 4 attributes:
* rel="alternate" - Defines the relation of this Web page and the Atom feed file.
* type="application/atom+xml" - Defines the MIME type of the Atom feed file.
* href="urlOfAtomFeedFile" - Defines the location of the Atom feed file.
* title="titleOfTheFeed" - Defines the title of the Atom feed file.
The following Web page contains a "link" tag good example that associate an Atom feed to this page:
<link rel="alternate" type="application/atom+xml"
href="atom.xml" title="Atom feed for FAQ pages">
<p>Definitions of Webmaster on the Web:</p>
<li>The person responsible for maintaining and
updating a Web site.</li>
<li>The administrator, maintainer and/or creater
of a web site.<li>
<li>The person who lays out the information trees,
designs the look, codes HTML pages, handles editing
and additions and checks that links are intact.</li>
There are several ways you can tell your visitors that you have Atom syndication feeds available on your Web site:
► Showing your syndication feed URLs as hyper links with the Atom syndication icon.
► Adding a <link> tag in your regular Web pages to allow browsers to show the RSS boomark icons.
► Making your Atom feed file name to be "atom.xml" to allow browsers and search engines to auto discover feeds.
Obviously, there are many ways to create Atom Feed files:
► Using Atom on-line scrapers - On-line scrapers are on-line services that can analyze your Web pages and convert the result into Atom feed files automatically. All you need to do is to provide the URLs of your Web pages.
► Using Atom off-line scrapers - Off-line scrapers are software tools that can analyze your Web pages and convert the result into Atom feed files automatically. All you need to do is to provide your Web page contents to scrapers.
► Using Atom file editors - Creating Atom feed files by entering required data and let the editor to finish the XML elements for you. A good example of Atom file editor is Tristana Writer.
► Using generic text editors - Creating Atom feed files by entering all the required XML elements yourself with generic editors, like UltraEdit or vi.
► Using Atom file generation APIs - APIs (Application Programming Interfaces) are programming packages, modules or libraries that you can interact with in your own programs to perform predefined functions. Atom file generation APIs helps you to write your own programs to generate Atom files. For example, XML::Atom is Atom file generation API for Perl language.
A XSD (XML Schema Definition) file contains a set of definitions of XML elements and attributes to form a new XML based language. The same DTD file can be used to validate XML files that comply with the new language.
Atom feed files are XML based, but there seems to be no XSD files exist to validate Atom feed files.
A DTD (Document Type Definitions) file contains a set of definitions of XML elements and attributes to form a new XML based language. The same DTD file can be used to validate XML files that comply with the new language.
Atom feed files are XML based, but there seems to be no DTD files exist to validate Atom feed files.
If your Atom feed file fails the w3.org validator, you will get an error message explaining where the error is in your feed file. The tutorial exercise below shows you a good example.
Try to validate the following Atom feed file:
<?xml version="1.0" encoding="utf-8"?>
<subtitle>A place to find information for Webmasters
<title>Webmaster FAQ Collection</title>
<summary>A massive collection of FAQs for Webmasters.
You will get the following error message:
line 2, column 3: Missing atom:link with rel="self"