Latest web development tutorials

RSS category 元素

RSS 參考手冊 完整RSS參考手冊

定義和用法

<category> 元素規定channel 或item 所屬的一個或多個種類。 <category> 元素也可以規定目錄中的層級位置(<category> 元素的值是正斜杠分隔的字符串)。

<category> 元素可以使RSS聚合器對站點/文章的目錄進行歸類群組(基於目錄對站點/文章進行分組)。


屬性

標籤 描述
domain

可選。 字符串或URL,標識分類的分類法。

例子:

<category domain="syndic8">IT</category>



實例

<?xml version="1.0" encoding="ISO-8859-1" ?>
<rss version="2.0">

<channel>
<title>W3CSchool Home Page</title>
<link>http://www.w3cschool.cc</link>
<description>Free web building tutorials</description>
<category>IT/Internet/Web development</category>
<item>
<title>RSS Tutorial</title>
<link>http://www.w3cschool.cc/rss</link>
<description>New RSS tutorial on W3CSchool</description>
<category>News</category>
<category>Tutorial</category>

</item>
</channel>

</rss>

嘗試一下»

RSS 參考手冊 完整RSS參考手冊