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

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

RSS 中的 <image>


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

Definition and Usage
定义和用法

The <image> element allows an image to be displayed when aggregators present a feed.
<image>元素的作用是:指定一个GIF或JPEG或PNG图片,用以与频道一起显示。


Tips and Notes
注意点

Note: The image must be of type GIF, JPEG or PNG.
注意:图片格式必须是:GIF、JPEG或PNG。


Child Elements of <image>
<image>元素的子元素

标签 描述
<description> Optional. Specifies the text in the HTML title attribute of the link around the image
可选参数。指定图片链接的HTML标题属性文本
<height> Optional. Defines the height of the image. Default is 31. Maximum value is 400
可选参数。定义图片高度。默认值是31;最大值是400
<link> Required. Defines the hyperlink to the website that offers the channel
必要参数。定义展示频道的站点超链接
<title> Required. Defines the text to display if the image could not be shown
必要参数。定义当图片不能显示时,页面中所显示的替代文字
<url> Required. Specifies the URL to the image
必要参数。指定图片的URL
<width> Optional.  Defines the width of the image. Default is 88. Maximum value is 144
可选参数。定义图片的宽度。默认值是88;最大值是144


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> <image> <url>http://www.ruanchen.com/tech/school/images/logo.gif</url> <title>ruanchen.com</title> <link>http://www.ruanchen.com</link> </image> <item> <title>RSS Tutorial</title> <link>http://www.ruanchen.com/tech/school/rss</link> <description>New RSS tutorial on ruanchen</description> </item>
</channel>
</rss>


自我演示

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

评论 (0) All

登陆 | 还没注册?