Fork me on GitHub

Project Notes

RSS and Atom

About RSS and Atom feeds for publishing and podcasting.


RSS 2.0 is the most common(?) feed format used in the wild, but it is a frozen standard owned by Harvard University. The standards-based Atom format is more extensible but has not had as wide adoption.


There are multiple versions of RSS. Two main branches:

  • RDF (or RSS 1.x) - the “RDF Site Summary”
  • RSS 2.x. By 2.0.1, officially “Really Simple Syndication”

Example RSS 2.0 feed:

<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
    <title>Example Feed</title>
    <description>Insert witty or insightful remark here</description>
    <lastBuildDate>Sat, 13 Dec 2003 18:30:02 GMT</lastBuildDate>
    <managingEditor> (John Doe)</managingEditor>
      <title>Atom-Powered Robots Run Amok</title>
      <guid isPermaLink="false">urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6a</guid>
      <pubDate>Sat, 13 Dec 2003 18:30:02 GMT</pubDate>
      <description>Some text.</description>

The conventional internet media type is application/rss+xml


The Atom Syndication Format is an XML language used for web feeds. It emerged as a format intended to rival or replace RSS, and has been standardised in rfc4287 The Atom Syndication Format and rfc5023 The Atom Publishing Protocol.

General rules:

  • All Atom feeds must be well-formed XML documents, and are identified with the application/atom+xml media type.
  • All elements described in this document must be in the namespace.
  • All timestamps in Atom must conform to RFC 3339.
  • Unless otherwise specified, all values must be plain text (i.e., no entity-encoded html).
  • xml:lang may be used to identify the language of any human readable text.
  • xml:base may be used to control how relative URIs are resolved.

An example of a document in the Atom Syndication Format:

<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="">
  <title>Example Feed</title>
  <subtitle>A subtitle.</subtitle>
  <link href="" rel="self" />
  <link href="" />
    <title>Atom-Powered Robots Run Amok</title>
    <link href="" />
    <link rel="alternate" type="text/html" href=""/>
    <link rel="edit" href=""/>
    <summary>Some text.</summary>
    <content type="xhtml">
      <div xmlns="">
        <p>This is the entry content.</p>
      <name>John Doe</name>

The following tag should be placed into the head of an HTML document to provide a link to an Atom feed.

<link href="atom.xml" type="application/atom+xml" rel="alternate" title="Sitewide Atom feed" />

Podcasting Feeds

RSS 2.0 support for enclosures led directly to the development of podcasting.

<enclosure url="" length="123456789" type="audio/mpeg" />

Enclosures with Atom: rel="enclosure" on <link>

<link rel="enclosure" href="" />

To appear in the iTunes Store, add the following namespace declaration

<rss xmlns:itunes="" version="2.0">

See Spec: iTunes Podcast RSS

Example iTunes-compatible podcast feed:

<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:itunes="">
        <title>All About Everything</title>
        <copyright>℗ &amp; © 2014 John Doe &amp; Family</copyright>
        <itunes:subtitle>A show about everything</itunes:subtitle>
        <itunes:author>John Doe</itunes:author>
        <itunes:summary>All About Everything is a show about everything. Each week we dive into any subject known to man and talk about it as much as we can. Look for our podcast in the Podcasts app or in the iTunes Store</itunes:summary>
        <description>All About Everything is a show about everything. Each week we dive into any subject known to man and talk about it as much as we can. Look for our podcast in the Podcasts app or in the iTunes Store</description>
            <itunes:name>John Doe</itunes:name>
        <itunes:image href=""/>
        <itunes:category text="Technology">
            <itunes:category text="Gadgets"/>
        <itunes:category text="TV &amp; Film"/>
        <itunes:category text="Arts">
            <itunes:category text="Food"/>
            <title>Shake Shake Shake Your Spices</title>
            <itunes:author>John Doe</itunes:author>
            <itunes:subtitle>A short primer on table spices</itunes:subtitle>
            <itunes:summary><![CDATA[This week we talk about
                <a href="https://itunes/">salt and pepper shakers</a>
                , comparing and contrasting pour rates, construction materials, and overall aesthetics. Come and join the party!]]></itunes:summary>
            <itunes:image href=""/>
            <enclosure length="8727310" type="audio/x-m4a" url=""/>
            <pubDate>Tue, 08 Mar 2016 12:00:00 GMT</pubDate>


Developing Feeds with RSS and Atom, by Ben Hammersley

Getting the examples source:

git clone example_source/hammersley

RSS and Atom By Heinz Wittenbrink

Getting the examples source:

git clone example_source/wittenbrink

Credits and References

About LCK#91 formatsrssrdfatombook
Project Source on GitHub Return to the Project Catalog

This page is a web-friendly rendering of my project notes shared in the LittleCodingKata GitHub repository.

LittleCodingKata is my collection of programming exercises, research and code toys broadly spanning things that relate to programming and software development (languages, frameworks and tools).

These range from the trivial to the complex and serious. Many are inspired by existing work and I'll note credits and references where applicable. The focus is quite scattered, as I variously work on things new and important in the moment, or go back to revisit things from the past.

This is primarily a personal collection for my own edification and learning, but anyone who stumbles by is welcome to borrow, steal or reference the work here. And if you spot errors or issues I'd really appreciate some feedback - create an issue, send me an email or even send a pull-request.