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

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

RSS 中的 <guid>


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

Definition and Usage
定义和用法

The <guid> element defines a unique identifier for the item.
<guid>元素的作用是:为每个项定义一个独立的标志符。


Tips and Notes
提示和注意点

Note: Aggregators must view the guid as a string. There are no rules for the syntax. It's up to the creator of the RSS document, to establish the uniqueness of the string.
注意:聚合器必须将guid看成一个字符串。这里没有固定的语法规则。它是用于创建RSS文档的,并保证字符串的独立性。

Tip: GUID = Globally Unique Identifier.
提示:GUID=通用独立标志符


Attributes
属性

属性 描述
isPermaLink Optional. If set to true, the reader may assume that it is a permalink to the item (a url that points to the full item described by the <item> element). The default value is true. If set to false, the guid may not be assumed to be a url
可选参数。如果设置为True,那么阅读器会假定指向一个项的永久连接(指向被<item>元素描述的全部项的URL)。默认值是True。如果将其设置为False,那么,guid可能不会假定一个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> <guid>http://www.ruanchen.com/tech/school/rss/item0768</guid> </item>
</channel>
</rss>


自我演示

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

评论 (0) All

登陆 | 还没注册?