RSS <category> 元素
❮ 完整的 RSS 参考
定义和用法
The <category> element specifies one or more categories the channel or item belongs to. The <category> element can also specify the hierarchic location in a category (the value of the <category> element is then a forward-slash separated string).
The <category> element makes it possible for RSS aggregators to group sites/articles based on category.
属性
标签 | 描述 |
---|---|
domain | Optional. A string or URL that identifies a categorization taxonomy. 示例 |
示例
<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title>W3Schools 主页</title>
<link>https://w3schools.org.cn</link>
<description>免费网页制作教程</description>
<category>IT/Internet/Web development</category>
<item>
<title>RSS 教程</title>
<link>https://w3schools.org.cn/xml/xml_rss.asp</link>
<description>W3Schools 上的新 RSS 教程</description>
<category>News</category>
<category>Tutorial</category>
</item>
</channel>
</rss>
自己动手试一试 »
❮ 完整的 RSS 参考