Atom feeds
The format for Atom feeds is specified in RFC 4287.
Structure
An Atom feed is an XML document with a single feed
element as the root.
The items in the feed are represented with /feed/entry
elements.
These come after the metadata children.
Feed
Typical metadata provided as children of feed
:
/feed/author
[1..*] – see Author below/feed/id
[1]/feed/link
with attributerel="self"
[0..1]- the preferred URI for retrieving this feed; recommended.
/feed/title
[1]/feed/updated
[1]
Optional:
/feed/category
[0..*]/feed/contributor
[0..*]/feed/generator
[0..1]/feed/icon
[0..1]/feed/logo
[0..1]/feed/link
with attributerel="alternate"
- at most 1 per (type × hreflang) combination
/feed/rights
[0..1]/feed/subtitle
[0..1]
Entry
Typical metadata provided as children of entry
:
/feed/entry/title
/feed/entry/link
/feed/entry/id
/feed/entry/updated
/feed/entry/summary
Optional:
/feed/entry/link
with attributesrel="alternate" type="text/html"
/feed/entry/link
with attributesrel="enclosure" type="audio/mpeg"
/feed/entry/published
/feed/entry/subtitle
/feed/entry/author
– see Author below/feed/entry/contributor
/feed/entry/content
with attrtype="xhtml"
- Its child should be a
<div xmlns="http://www.w3.org/1999/xhtml">
. - Set the
xml:base="https://..."
attr oncontent
to resolve relative links. - Set the
xml:lang="en"
attr oncontent
- Its child should be a
Author
The author
element can be used in feed
or entry
.
Its children may be:
author/name
[1]author/uri
[0..1]author/email
[0..1]