2007.03.16 Friday

RSS2.0:独自拡張(属性指定)のパース

RSS2.0では、ベンダーが独自拡張できるようになっています。
例えば、
<item><title>タイトル</title><hoge:image xmlns:hoge="http://hoge.com/rss/" class="small" url="http://hoge.com/small.gif" height="70" width="49" /><hoge:image xmlns:hoge="http://hoge.com/rss/" class="large" url="http://hoge.com/large.gif" height="100" width="69" /></item>

と、こんな感じで、一つのアイテムの中に
small,largeの情報を持てたりするわけです。
ただ、独自拡張なだけに、パースするには、それなりの労力が必要。

ということで、簡単にメモ。
続きを読む>>
1/1