w3pop.com :: 网络学院 :: RSS :: RSS < enclosure > 元素
The <enclosure> element allows a media-file to be included with an item.
<enclosure> 元素的作用是:允许将一个媒体文件导入一个项中。
| 属性 | 描述 |
|---|---|
| length | Required. Defines the length (in bytes) of the media file 必要参数。定义媒体文件的长度(单位:字节) |
| type | Required. Defines the type of media file 必要参数。定义媒体文件的类型 |
| url | Required. Defines the URL to the media file 必要参数。定义媒体文件的URL |
<?xml version="1.0" encoding="ISO-8859-1" ?> <rss version="2.0"> <channel>
<title>W3pop Home Page</title>
<link>http://www.w3pop.com</link>
<description>Free web building tutorials</description>
<item>
<title>RSS Tutorial</title>
<link>http://www.w3pop.com/tech/school/rss</link>
<description>New RSS tutorial on W3pop</description>
<enclosure url="http://www.w3pop.com/media/3d.wmv"
length="78645" type="video/wmv" />
</item>
</channel>
</rss> |
<enclosure> 元素
使用<enclosure>元素的方法
评论 (0)
All