当前位置: 首页 > 网络学院 > XML相关教程 > RSS > <enclosure>

RSS
RSS 介绍
RSS 历史
RSS 语法
RSS <channel> 元素
RSS <item> 元素
RSS 发布 Feed
RSS 解读 Feed

RSS 中的 <enclosure>


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-03-04   浏览: 247 ::
收藏到网摘: n/a

Definition and Usage
定义和用法

The <enclosure> element allows a media-file to be included with an item.
<enclosure> 元素的作用是:允许将一个媒体文件导入一个项中。


Attributes
属性

属性 描述
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


Example
案例

<?xml version="1.0" encoding="ISO-8859-1" ?>
<rss version="2.0">
<channel> <title>ruanchen Home Page</title> <link>http://www.ruanchen.com</link> <description>Free web building tutorials</description> <item> <title>RSS Tutorial</title> <link>http://www.ruanchen.com/tech/school/rss</link> <description>New RSS tutorial on ruanchen</description> <enclosure url="http://www.ruanchen.com/media/3d.wmv" length="78645" type="video/wmv" /> </item>
</channel>
</rss>


自我演示

<enclosure> 元素
使用<enclosure>元素的方法

评论 (0) All

登陆 | 还没注册?