Atom (format)

from Wikipedia, the free encyclopedia
A common icon used in web feeds
User interface of a feed reader

Atom is used in computer technology as an umbrella term for two standards: The Atom Syndication Format (ASF), an XML format, enables the platform-independent exchange of information, e.g. B. for web feeds . The Atom Publishing Protocol (APP, whereby AtomPub has become common) was created to enable the creation and editing of web resources on the basis of simple HTML and XML. The two Atom standards thus offer the possibility of editing and distributing web content.

Atom Syndication Format

The Syndication Format (ASF) is the most common implementation of the Atom standards. ASF is being developed to succeed RSS . It's the modern form of a newsletter .

Atom emerged from the need to combine the advantages of the different RSS formats in a new format and to add new elements. The developers - mostly bloggers - have designed ASF to meet the special needs of blogs and news sites. The main supporters of Atom are organized in the AtomEnabled Alliance .

The current version of the Atom Syndication Format is the IETF draft of August 11, 2005, which was approved by the IESG as a proposed standard in August 2005 and published in December 2005 as RFC 4287 . Most of the larger feed providers are already working to support the format. The MIME type of Atom is application/atom+xml.

The processing of information in a standardized exchange format is also called aggregation .

Minimal example

<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <author>
    <name>Autor des Weblogs</name>
  </author>
  <title>Titel des Weblogs</title>
  <id>urn:uuid:60a76c80-d399-11d9-b93C-0003939e0af6</id>
  <updated>2003-12-14T10:20:09Z</updated>

  <entry>
    <title>Titel des Weblog-Eintrags</title>
    <link href="http://example.org/2003/12/13/atom-beispiel"/>
    <id>urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6a</id>
    <updated>2003-12-13T18:30:02Z</updated>
    <summary>Zusammenfassung des Weblog-Eintrags</summary>
    <content>Volltext des Weblog-Eintrags</content>
  </entry>
</feed>

Different types of content

The main peculiarity of Atom compared to RSS is the possibility that for content-bearing elements it can be expressly stated in which format the content is encoded. In RSS 2.0, for example, the descriptionelement can contain pure text or masked HTML without a processing program knowing what it is about. Atom requires uniqueness by giving content-bearing elements an typeattribute. In addition to pure text and masked HTML , it is also possible to directly XHTML - Markup with namespace embed -indication. XHTML is especially useful in the contentelement.

Example of pure text in the titleelement:

<title type="text">Beispieleintrag</title>

The typeattribute can also be omitted in this case, as is textthe default value of the attribute.

Example of HTML in the summaryelement:

<summary type="html">Beispielzusammenfassung mit
 &lt;strong&gt;wichtigem Text&lt;/strong&gt;</summary>

The HTML-specific characters <, >and &are circumscribed with the entity references &lt;, &gt;and &amp;. Alternatively, the content can be placed in a CDATA section:

<summary type="html"><![CDATA[ Beispielzusammenfassung mit
 <strong>wichtigem Text</strong> ]]></summary>

Example of XHTML in the contentelement:

<content type="xhtml" xml:base="http://example.org/">
  <div xmlns="http://www.w3.org/1999/xhtml">
    <p>Beispielabsatz mit <strong>wichtigem Text</strong> und einem
    <a href="beispiel">relativen Hyperlink</a>.</p>
  </div>
</content>

The contentelement receives an divelement from the XHTML namespace as a child. Further XHTML elements can be noted directly in it.

Atom programming interface (AtomPub)

The Atom programming interface can be used, for example, to influence the content stored in weblog software with a client application .

functionality

Communication with the system works according to the REST principle:

GET
to obtain information about existing elements and to carry out other read-only accesses.
PUT
to edit a known item.
POST OFFICE
creates a new, dynamically named element.
DELETE
leads to the deletion of an element.

These actions are used in conjunction with the three main URIs , the data exchange format being what is known as an “Atom Entry”, a fragment / entry of a full Atom feed.

PostURI
awaits POST. Is used to create new elements. If you send an Atom Entry to this URI, a new element is created.
EditURI
expects PUT, GET or DELETE. Is required to edit elements. Here, too, data is exchanged via the Atom Entry.
FeedURI
awaits GET. Represents a complete atom feed.

The Atom programming interface and the Atom Syndication Format thus complement each other.

Web links