目次

Atom のフォーマット (Atom の書式と形式)

Atomのフォーマットを紹介します。

書式例

<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">

 <title>フィードのタイトル</title>
 <link href="http://www.ipentec.com/"/> <!-- サイトのURL -->
 <updated>2014-10-01T18:30:02Z</updated> <!-- 更新日時 -->
 <author>
   <name>iPentec PENGUIN</name> <!-- 作成者 -->
 </author>
 <id>urn:uuid:60a76c80-d399-11d9-b93C-0003939e0af6</id> <!-- ID -->

 <entry>
   <title>記事のタイトル</title>
   <link href="http://www.ipentec.com/article/01"/> <!-- リンク先 -->
   <id>urn:uuid:E4E08C52-2636-4760-BC5F-6ADA47E5DD75</id> <!-- ID -->
   <updated>2014-04-13T18:30:02Z</updated> <!-- 更新日時 -->
   <summary>記事の概要</summary>
 </entry>

 <entry>
   <title>記事のタイトル</title>
   <link href="http://www.ipentec.com/article/01"/> <!-- リンク先 -->
   <id>urn:uuid:89514132-6671-4A7C-9834-7C8F78960578</id> <!-- ID -->
   <updated>2014-04-10T18:30:02Z</updated> <!-- 更新日時 -->
   <summary>記事の概要</summary>
 </entry>

 <entry>
   <title>記事のタイトル</title>
   <link href="http://www.ipentec.com/article/01"/> <!-- リンク先 -->
   <id>urn:uuid:CAFB28F8-2457-46DF-ACBE-2506770136D2</id> <!-- ID -->
   <updated>2014-04-01T18:30:02Z</updated> <!-- 更新日時 -->
   <summary>記事の概要</summary>
 </entry>
</feed>

補足

idは個々のアイテムに対して唯一となるIDを記述します。URLの変更があったとしても同一性が保持できることが望ましいとされているためURLを記述するのはお勧めできません。GUIDやUUIDなどのID値を記載します。
ホストを利用している場合は下記のようにホスト名を記載する場合もあります。
<id>tag:ipentec.com,2014:1</id>

また、updatedタグなどの時刻表記はISO8601形式で記述します。
著者
iPentec.com の代表。ハードウェア、サーバー投資、管理などを担当。
Office 365やデータベースの記事なども担当。
掲載日: 2014-03-03
iPentec all rights reserverd.