Create an Atom Document

Atom is gaining ground as a feed format, and we should be paying attention to it. This hack guides you through the creation of an Atom document from a template.

Atom is an emerging syndication format for newsfeeds, an attempt to evolve from and improve on the current RSS scene. You can find a draft of the specification at The Atom forum folks are also creating an Atom API to support Atom newsfeeds (

The goals of the forum are that Atom will be 100 percent vendor-neutral, freely extensible by anybody, cleanly and thoroughly specified, and implemented by everybody ( The Atom spec certainly is more concise than its competitors, and I like that. More and more aggregators are supporting Atom, so I’ll say with some confidence that Atom is headed in the right direction, if not to the head of the pack—all in due time, of course.

The following template may be used to create your own Atom feed. atom.xml is a brief example of an Atom document:

<feed version="0.3" xmlns="" xml:lang="en"> <title>Wy'east Communications</title> <link rel="alternate" type="text/html" href=""/> <author> <name>Mike Fitzgerald</name> </author> <tagline>Wy'east Communication is an XML consultancy.</tagline> <modified>2004-08-14T02:43:00-07:00</modified> <entry> <title>Legend of Wy'east</title> ...

Get XML Hacks now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.