本日志标题:博客日志摘要暨RSS技术        [2006-10-17] Bookmark and Share

本文节选自《Dreamweaver8+ASP动态网站开发从基础到实践

日志的摘要对于一个博客系统来说是必不可少的象征性技术,其主要RSS技术。RSS是英文Rich Site Summary(丰富站点摘要)的缩写,它是一种用于共享日志标题和内容的XML格式。

当不同的“博客系统”使用了统一格式的RSS,就方便了大众的阅读。利用RSS可通过浏览日志的标题或部分内容迅速查看到所需的阅读内容,为浏览者获取有用信息争取时间、提高效率。同时RSS还能被“聚合”,将行行色色“Bloggler”的RSS进行信息的获取和重整,那么这将是一个多么丰富的阅读资源。所以,对于“博客系统”而言,RSS技术是不可少的,这也是“博客系统”有区别于其他Web应用系统的功能点之一。

RSS技术规范

首先RSS是XML数据格式的一种,相对一般的XML,RSS则规定了使用元素和结构。另外,当前使用的规范是RSS2.0,其有如下的规定:

1,在RSS文档中的根元素为“<rss>”,同时具有属性version以表示RSS所遵循的规则版本,同时RSS鉴于XML数据格式,所以必须以“</rss>”关闭:


<rss version="2.0">
</rss>



2,<rss>元素只有一个子元素,即频道<channel>:


<rss version="2.0">
    <channel>
    </channel>
</rss>



3,<channel>元素的子元素可以有<title>表示频道的名称,<link>表示频道的地址,<description>表示频道的描述,<language>表示频道文章所用语言等,<generator>表示生成该频道的程序名……:


<channel>
    <title>Cool Blog 我的博客日志</title>
    <link>http://www.164.cc/dwblog</link>
    <description>这是我用Dreamweaver 8开发的博客日志系统</description>
    <language>zh-cn</language>
    <generator>Dreamweaver 8</generator>
</channel>



4,对于RSS最重要的则是文章(日志)的元素<item>,该元素用来表示某一篇文章(日志)的具体信息。其可有子元素<title>表示文章(日志)的标题,<link>表示文章(日志)的链接地址,<category>表示文章(日志)的所属分类,<description>表示文章(日志)的内容描述,<pubDate>表示文章(日志)的发布时间:


<item>
    <title>这是某篇日志的标题</title>
    <link>http://www.cnbruce.com/showlog.asp?b_id=1</link>
    <category>前台技术</category>
    <description>这篇日志的内容</description>
    <pubDate>2006-05-01 16:40:53</pubDate>
</item>



所以一个完整的RSS文档规范格式如下:


<?xml version="1.0" encoding="gb2312"?>
<rss version="2.0">
<channel>
    <title>Cool Blog 我的博客日志</title>
    <link>http://www.cnbruce.com</link>
    <description>这是我用Dreamweaver 8开发的博客日志系统</description>
    <language>zh-cn</language>
    <generator>Dreamweaver 8</generator>

<item>
        <title>这是某篇日志的标题</title>
        <link>http://www.cnbruce.com/showlog.asp?b_id=1</link>
        <category>前台技术</category>
        <description>这篇日志的内容</description>
        <pubDate>2006-05-01 16:40:53</pubDate>
</item>
</channel>
</rss>



其中这样的格式内容中对博客系统来说,最重要的即是对<item>元素的定义,一篇日志应用一个<item>,如果运用服务器端“重复区域”的技术,就可动态提取获得数据库中最近的日志作为RSS的内容,并以多个<item>显示。

其他RSS内容链接:

全方位接触RSS
http://www.cnbruce.com/blog/showlog.asp?cat_id=34&log_id=948

RSS2.0技术规范摘录
http://www.cnbruce.com/blog/showlog.asp?cat_id=34&log_id=949

在百度搜索完整的博客日志摘要暨RSS技术内容,或者用Google搜索相关的更多内容

By [cnbruce] at 18:07:04 | 评论 [3] | 浏览 [19086] | TrackBack| 返回顶部

About Comments
Welcome to your next beauty destination!
Founded in 2014 by a female entrepreneur in Dubai with a strong vision that every person is unique and needs his beauty treat to fulfill his ultimate potential, an Art of Beauty Center has become a preferred style destination for both expats and residents in Dubai.
Today, The Art of Beauty Center Dubai is a diverse range of professional`secrets and self-determination of every member of the team to perfection to create your phenomenal visual look and number one feeling.

Site:
http://artofbeautycenter.ae/nails/
Location: 1017b Al Wasl Road, Umm Suqeim 2, Manara Area, Dubai, United Arab Emirates
Phone: +971 4 344 4004
Online Booking: https://artofbeautycenter.ae/online-consultation/
By [HollieRob] at 2018-9-19 11:51:11
Welcome to your next beauty destination!
Founded in 2014 by a female entrepreneur in Dubai with a strong vision that every person is unique and needs his beauty treat to fulfill his ultimate potential, an Art of Beauty Center has become a preferred style destination for both expats and residents in Dubai.
Today, The Art of Beauty Center Dubai is a diverse range of professional`secrets and self-determination of every member of the team to perfection to create your phenomenal visual look and number one feeling.

Site: https://artofbeautycenter.ae/about/
Location: 1017b Al Wasl Road, Umm Suqeim 2, Manara Area, Dubai, United Arab Emirates
Phone: +971 4 344 4004
Online Booking: https://artofbeautycenter.ae/online-consultation/
By [HollieRob] at 2018-9-19 11:52:51
hello!
Welcome to your next beauty destination!
Today, The Art of Beauty Center is a diverse range of professional`secrets and self-determination of every member of the team to perfection to create your phenomenal visual look and number one feeling.
Site: https://bodycare.artofbeautycenter.ae
Phone: +971 55 173 6778
Location: 1017b, Al Wasl Road, Umm Suqeim 2, Manara Area - Dubai, UAE
By [BettyHaigo] at 2018-9-25 0:38:51


Post a Comment
呢称: 验证码: 
禁止笑脸转换 禁止UBB | 缩放输入框:6 5 | [Ctrl+Enter提交](1000个字符限制)