Common Constructs


<category> has one required attribute, term, and two optional attributes, scheme and label.

term identifies the category.

scheme identifies the categorization scheme via a URI.

label provides a human-readable label for display.


<content> either contains, or links to, the complete content of the entry.

In the most common case, the type attribute is either text, html, xhtml, in which case the content element is defined identically to other text constructs, which are described here.

Otherwise, if the src attribute is present, it represents the URI of where the content can be found. The type attribute, if present, is the media type of the content.

Otherwise, if the type attribute ends in +xml or /xml, then an xml document of this type is contained inline.

Otherwise, if the type attribute starts with text, then an escaped document of this type is contained inline.

Otherwise, a base64 encoded document of the indicated media type is contained inline.


<link> is patterned after html's link element. It has one required attribute, href, and five optional attributes: rel, type, hreflang, title, and length.

href is the URI of the referenced resource (typically a Web page).

rel contains a single link relationship type. It can be a full URI or one of the following predefined values (default=alternate):

  • alternate: An alternate representation of the entry or Feed, for example a permalink to the html version of the entry, or the front page of the weblog.
  • enclosure: A related resource, which is potentially large in size and might require special handling, for example an audio or video recording.
  • related: An document related to the entry or Feed.
  • self: The Feed itself.
  • via: The source of the information provided in the entry.

type indicates the media type of the resource.

hreflang indicates the language of the referenced resource.

title indicates the human readable information about the link, typically for display purposes.

length indicates the length of the resource, in bytes.


<author> and <contributor> describes a person, corporation, or similar entity. It has one required element, name, and two optional elements: uri, email.

<name> conveys a human-readable name for the person.

<uri> contains a home page for the person.

<email> contains an email address for the person.


<title>, <summary>, <content>, and <rights> contain human-readable text, usually in small quantities. The type attribute determines how this information is encoded (default="text").

If type="text", then this element contains plain text with no entity escaped html.

<title type="text">AT&amp;T bought by SBC!</title>

If type="html", then this element contains entity escaped html.

<title type="html">
   AT&amp;amp;T bought &lt;b&gt;by SBC&lt;/b&gt;!

If type="xhtml", then this element contains inline xhtml, wrapped in a div element.

<title type="xhtml">
   <div xmlns="">
      AT&amp;T bought <b>by SBC</b>!

Check complete specification for atom 1.0 RFC4287.

Atom 1.0 Example Feed

The example shows how to write a Feed using Atom 1.0.

<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="">

   <title>Example Feed</title>
   <subtitle>Insert witty or insightful remark here</subtitle>
   <link href=""/>
      <title>Tutorial on Atom</title>
      <link href=""/>
      <summary>Some text.</summary>

Atom1.0 File Extension

A specific file-extension for an Atom 1.0 document is not required. But .xml is recommended.