メインコンテンツまでスキップ

はてなXML名前空間

本ドキュメントに関する注意事項

本ドキュメントははてなのWebサービスにおけるXML名前空間の独自拡張について説明するものです。この名前空間は主に RSS 1.0 や RSS 2.0 の文書で用いられています。

名前空間 URL

http://www.hatena.ne.jp/info/xmlns#

構文

hatena:imageurl

RSSのitemもしくはAtomフィードのentryの子要素です。画像ファイルが配置されているURLを表しています。

<item rdf:about="http://f.hatena.ne.jp/jkondo/20041224203139">
<title>20041224203139</title>
<link>http://f.hatena.ne.jp/jkondo/20041224203139</link>
<description />
<content:encoded>
...
</content:encoded>
<dc:date>2004-12-24T20:31:39+09:00</dc:date>
<hatena:imageurl>
http://f.hatena.ne.jp/images/fotolife/j/jkondo/20041224/20041224203139.jpg
</hatena:imageurl>
</item>

hatena:imageurlsmall

hatena:imagefileの画像の縮小画像を表しています。サムネイル画像として利用することが出来ます。

<item rdf:about="http://f.hatena.ne.jp/jkondo/20041224203139">
<title>20041224203139</title>
<link>http://f.hatena.ne.jp/jkondo/20041224203139</link>
<description />
<content:encoded>
...
</content:encoded>
<dc:date>2004-12-24T20:31:39+09:00</dc:date>
<hatena:imageurlsmall>
http://f.hatena.ne.jp/images/fotolife/j/jkondo/20041224/20041224203139.jpg
</hatena:imageurl>
<hatena:imageurlsmall>
http://f.hatena.ne.jp/images/fotolife/j/jkondo/20041224/20041224203139_m.gif
</hatena:imageurlsmall>
</item>

hatena:syntax

要素の内容を使うためのはてな記法を表しています。

<entry xmlns="http://purl.org/atom/ns#" xmlns:hatena="http://www.hatena.ne.jp/info/xmlns#">
<title>Sample Image</title>
<link rel="alternate" type="text/html" href="http://f.hatena.ne.jp/naoya/20050114170129"/>
<issued>2005-01-14T17:01:29+09:00</issued>
<author>
<name>naoya</name>
</author>
<generator version="1.0">http://f.hatena.ne.jp/</generator>
<id>tag:hatena.ne.jp,2005:fotolife-20050114170129</id>
<hatena:imageurl>
http://f.hatena.ne.jp/images/fotolife/n/naoya/20050114/20050114170129.jpg
</hatena:imageurl>
<hatena:imageurlsmall>
http://f.hatena.ne.jp/images/fotolife/n/naoya/20050114/20050114170129_m.gif
</hatena:imageurlsmall>
<hatena:syntax>f:id:naoya:20050114170129:image</hatena:syntax>
</entry>

hatena:score / hatena:contentscore / hatena:furigana

はてなダイアリーキーワードにおける情報を表しています。RSSのitemやAtomフィードのentryの子要素です。

<item rdf:about="http://d.hatena.ne.jp/keyword/sample">
<title>sample</title>
<link>http://d.hatena.ne.jp/keyword/sample</link>
<description>Sample Keyword</description>
<dc:date>2005-03-11T12:49:00+09:00</dc:date>
<dc:subject>Sample Category</dc:subject>
<hatena:score>100</hatena:score>
<hatena:contentscore>50</hatena:contentscore>
<hatena:furigana>さんぷる</hatena:furigana>
</item>

hatena:bookmarkcount

はてなブックマークエントリのブックマーク数を表しています。

<item rdf:about="http://d.hatena.ne.jp/jkondo/20100706/1278367206">
<title>...</title>
<link>http://d.hatena.ne.jp/jkondo/20100706/1278367206</link>
<description>...</description>
<content:encoded>
...
</content:encoded>
<dc:creator>jkondo</dc:creator>
<dc:date>2010-07-06T07:00:06+09:00</dc:date>
<hatena:bookmarkcount>777</hatena:bookmarkcount>
</item>

hatena:formatted-content

はてな記法などから変換されたHTMLを表します。

 <entry>
<title>記事タイトル</title>
...
<content type="text/x-hatena-syntax">
** 記事本文
- リスト1
- リスト2
内容
</content>
<hatena:formatted-content>
<div class="section">
<h4>記事本文</h4>
<ul>
<li>リスト1</li>
<li>リスト2</li>
</ul><p>内容</p>
</div>
</hatena:formatted-content>
</entry>

変更履歴

  • 2013-09-04 formatted-content追加
  • 2010-12-13 Hatena Developer Center で改めて公開
  • 2010-07-16 hatena:bookmarkcount追加
  • 2005-04-04 hatena:score, hatena:contentscore, hatena:furigana 追加
  • 2004-01-15 hatena:syntax 追加
  • 2004-01-14 URI名前空間の修正
  • 2004-12-25 リリース