What is RSS

[Refers to  http://www.w3schools.com/rss/]

What is RSS?

RSS stands for Really Simple Syndication RSS allows you to syndicate your site content RSS defines an easy way to share and view headlines and content RSS files can be automatically updated RSS allows personalized views for different sites RSS is written in XML

Who Should use RSS?

Webmasters who seldom update their web sites do not need RSS!

RSS is useful for web sites that are updated frequently, like:

News sites - Lists news with title, date and descriptions Companies - Lists news and new products Calendars - Lists upcoming events and important days Site changes - Lists changed pages or new pages

How RSS Works

RSS is used to share content between websites.

With RSS, you register your content with companies called aggregators.

So, to be a part of it: First, create an RSS document and save it with an .xml extension. Then, upload the file to your website. Next, register with an RSS aggregator. Each day the aggregator searches the registered websites for RSS documents, verifies the link, and displays information about the feed so clients can link to documents that interests them.

An Example RSS document

RSS documents use a self-describing and simple syntax.

Let's look at a simple RSS document:

<?xml version="1.0" encoding="ISO-8859-1" ?>
            <rss version="2.0">
<channel>
            <title>W3Schools Home Page</title>
            <link>http://www.w3schools.com</link>
            <description>Free web building tutorials</description>
            <item>
            <title>RSS Tutorial</title>
            <link>http://www.w3schools.com/rss</link>
            <description>New RSS tutorial on W3Schools</description>
            </item>
            <item>
            <title>XML Tutorial</title>
            <link>http://www.w3schools.com/xml</link>
            <description>New XML tutorial on W3Schools</description>
            </item>
            </channel>
</rss>

The first line in the document - the XML declaration - defines the XML version and the character encoding used in the document. In this case the document conforms to the 1.0 specification of XML and uses the ISO-8859-1 (Latin-1/West European) character set.

The next line is the RSS declaration which identifies that this is an RSS document (in this case, RSS version 2.0).

The next line contains the <channel> element. This element is used to describe the RSS feed.

The <channel> element has three required child elements:

<title> - Defines the title of the channel (e.g. W3Schools Home Page) <link> - Defines the hyperlink to the channel (e.g. http://www.w3schools.com) <description> - Describes the channel (e.g. Free web building tutorials)

Each <channel> element can have one or more <item> elements.

Each <item> element defines an article or "story" in the RSS feed.

The <item> element has three required child elements:

<title> - Defines the title of the item (e.g. RSS Tutorial) <link> - Defines the hyperlink to the item (e.g. http://www.w3schools.com/rss) <description> - Describes the item (e.g. New RSS tutorial on W3Schools)

Finally, the two last lines close the <channel> and <rss> elements.


 

转载于:https://www.cnblogs.com/ellipse-gao/archive/2007/05/26/760758.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值