RSS <enclosure> 元素
定义和用法
<enclosure> 元素允许把媒体文件包含在项目中。
属性
| 属性 | 描述 | 
|---|---|
| length | 必需。定义媒体文件的长度(以字节计)。 | 
| type | 必需。定义媒体文件的类型。 | 
| url | 必需。定义指向该媒体文件的 URL。 | 
实例
<?xml version="1.0" encoding="ISO-8859-1" ?>
<rss version="2.0">
<channel>
  <title>W3School Home Page</title>
  <link>http://www.w3school.com.cn</link>
  <description>Free web building tutorials</description>
  <item>
    <title>RSS Tutorial</title>
    <link>http://www.w3school.com.cn/rss</link>
    <description>New RSS tutorial on W3School</description>
    <enclosure url="http://www.w3school.com.cn/media/movie.wmv"
    length="856329" type="video/wmv" />
  </item>
</channel>
</rss>