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