`
happmaoo
  • 浏览: 4341915 次
  • 性别: Icon_minigender_1
  • 来自: 杭州
社区版块
存档分类
最新评论

What is RSS?

阅读更多

What is RSS?

by Mark Pilgrim
December 18, 2002
<!-- mega preparse mp: -->

<!-- dy --><iframe marginwidth="0" marginheight="0" src="http://ad.doubleclick.net/adi/xml.ds/art;pos=_art;sz=336x280;ord=1507972002?" frameborder="0" width="336" scrolling="no" height="280"></iframe><noscript></noscript>
<!-- me -->RSS is a format for syndicating news and the content of news-like sites, including major news sites like Wired, news-oriented community sites like Slashdot, and personal weblogs. But it's not just for news. Pretty much anything that can be broken down into discrete items can be syndicated via RSS: the "recent changes" page of a wiki, a changelog of CVS checkins, even the revision history of a book. Once information about each item is in RSS format, an RSS-aware program can check the feed for changes and react to the changes in an appropriate way.

RSS-aware programs called news aggregators are popular in the weblogging community. Many weblogs make content available in RSS. A news aggregator can help you keep up with all your favorite weblogs by checking their RSS feeds and displaying new items from each of them.

A brief history

<!-- sidebar begins -->

Related Reading

Content Syndication with RSS

Content Syndication with RSS
By BenHammersley

<!-- builds links to list in sidebar -->Table of Contents
Index
Sample Chapter

Read Online--Safari Search this book on Safari:
Only This Book All of Safari
Code Fragments only
<!-- sidebar ends -->

But coders beware. The name "RSS" is an umbrella term for a format that spans several different versions of at least two different (but parallel) formats. The original RSS, version 0.90, was designed by Netscape as a format for building portals of headlines to mainstream news sites. It was deemed overly complex for its goals; a simpler version, 0.91, was proposed and subsequently dropped when Netscape lost interest in the portal-making business. But 0.91 was picked up by another vendor, UserLand Software, which intended to use it as the basis of its weblogging products and other web-based writing software.

<!-- sidebar begins --><!-- don't move sidebars --><!-- sidebar ends -->

In the meantime, a third, non-commercial group split off and designed a new format based on what they perceived as the original guiding principles of RSS 0.90 (before it got simplified into 0.91). This format, which is based on RDF, is called RSS 1.0. But UserLand was not involved in designing this new format, and, as an advocate of simplifying 0.90, it was not happy when RSS 1.0 was announced. Instead of accepting RSS 1.0, UserLand continued to evolve the 0.9x branch, through versions 0.92, 0.93, 0.94, and finally 2.0.

What a mess.

So which one do I use?

That's 7 -- count 'em, 7! -- different formats, all called "RSS". As a coder of RSS-aware programs, you'll need to be liberal enough to handle all the variations. But as a content producer who wants to make your content available via syndication, which format should you choose?

RSS versions and recommendations Version Owner Pros Status Recommendation 0.90 0.91 0.92, 0.93, 0.94 1.0 2.0
Netscape Obsoleted by 1.0 Don't use
UserLand Drop dead simple Officially obsoleted by 2.0, but still quite popular Use for basic syndication. Easy migration path to 2.0 if you need more flexibility
UserLand Allows richer metadata than 0.91 Obsoleted by 2.0 Use 2.0 instead
RSS-DEV Working Group RDF-based, extensibility via modules, not controlled by a single vendor Stable core, active module development Use for RDF-based applications or if you need advanced RDF-specific modules
UserLand Extensibility via modules, easy migration path from 0.9x branch Stable core, active module development Use for general-purpose, metadata-rich syndication

What does RSS look like?

Imagine you want to write a program that reads RSS feeds, so that you can publish headlines on your site, build your own portal or homegrown news aggregator, or whatever. What does an RSS feed look like? That depends on which version of RSS you're talking about. Here's a sample RSS 0.91 feed (adapted from XML.com's RSS feed):

<rss version="0.91">
<channel>
<title>XML.com</title>
<link>http://www.xml.com/</link>
<description>XML.com features a rich mix of information and services for the XML community.</description>
<language>en-us</language>
<item>
<title>Normalizing XML, Part 2</title>
<link>http://www.xml.com/pub/a/2002/12/04/normalizing.html</link>
<description>In this second and final look at applying relational normalization techniques to W3C XML Schema data modeling, Will Provost discusses when not to normalize, the scope of uniqueness and the fourth and fifth normal forms.</description>
</item>
<item>
<title>The .NET Schema Object Model</title>
<link>http://www.xml.com/pub/a/2002/12/04/som.html</link>
<description>Priya Lakshminarayanan describes in detail the use of the .NET Schema Object Model for programmatic manipulation of W3C XML Schemas.</description>
</item>
<item>
<title>SVG's Past and Promising Future</title>
<link>http://www.xml.com/pub/a/2002/12/04/svg.html</link>
<description>In this month's SVG column, Antoine Quint looks back at SVG's journey through 2002 and looks forward to 2003.</description>
</item>
</channel>
</rss>

Simple, right? A feed comprises a channel, which has a title, link, description, and (optional) language, followed by a series of items, each of which have a title, link, and description.

Now look at the RSS 1.0 version of the same information:

<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns="http://purl.org/rss/1.0/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
>
<channel rdf:about="http://www.xml.com/cs/xml/query/q/19">
<title>XML.com</title>
<link>http://www.xml.com/</link>
<description>XML.com features a rich mix of information and services for the XML community.</description>
<language>en-us</language>
<items>
<rdf:Seq>
<rdf:li rdf:resource="http://www.xml.com/pub/a/2002/12/04/normalizing.html"/>
<rdf:li rdf:resource="http://www.xml.com/pub/a/2002/12/04/som.html"/>
<rdf:li rdf:resource="http://www.xml.com/pub/a/2002/12/04/svg.html"/>
</rdf:Seq>
</items>
</channel>
<item rdf:about="http://www.xml.com/pub/a/2002/12/04/normalizing.html">
<title>Normalizing XML, Part 2</title>
<link>http://www.xml.com/pub/a/2002/12/04/normalizing.html</link>
<description>In this second and final look at applying relational normalization techniques to W3C XML Schema data modeling, Will Provost discusses when not to normalize, the scope of uniqueness and the fourth and fifth normal forms.</description>
<dc:creator>Will Provost</dc:creator>
<dc:date>2002-12-04</dc:date>
</item>
<item rdf:about="http://www.xml.com/pub/a/2002/12/04/som.html">
<title>The .NET Schema Object Model</title>
<link>http://www.xml.com/pub/a/2002/12/04/som.html</link>
<description>Priya Lakshminarayanan describes in detail the use of the .NET Schema Object Model for programmatic manipulation of W3C XML Schemas.</description>
<dc:creator>Priya Lakshminarayanan</dc:creator>
<dc:date>2002-12-04</dc:date>
</item>
<item rdf:about="http://www.xml.com/pub/a/2002/12/04/svg.html">
<title>SVG's Past and Promising Future</title>
<link>http://www.xml.com/pub/a/2002/12/04/svg.html</link>
<description>In this month's SVG column, Antoine Quint looks back at SVG's journey through 2002 and looks forward to 2003.</description>
<dc:creator>Antoine Quint</dc:creator>
<dc:date>2002-12-04</dc:date>
</item>
</rdf:RDF>

Quite a bit more verbose. People familiar with RDF will recognize this as an XML serialization of an RDF document; the rest of the world will at least recognize that we're syndicating essentially the same information. In fact, we're including a bit more information: item-level authors and publishing dates, which RSS 0.91 does not

分享到:
评论

相关推荐

    Android代码-Munch

    What is Munch ? Munch is an android app which enable the users to manage their Rss feeds. User can add new sources, manage them and view the article associated with the feeds. Permissions: Internet ...

    Android SampleNetworking

    RssParser – is used to parse the results returned from the server into Data Objects. If we look at the responsibilities of the classes it’s clear where to break them up and delegate. Line numbers ...

    Professional Python Frameworks - Web 2.0 Programming with Django and TurboGears

    What Is MochiKit? 341 What’s Inside MochiKit? 341 MochiKit.Async 342 MochiKit.Base 349 MochiKit.DOM 351 MochiKit.Logging 352 MochiKit.Signal 352 MochiKit.Visual 355 MochiKit Miscellany 357 ...

    Professional Ajax

    The chapter-level breakdown is as follows: Chapter 1: "What Is Ajax?" This chapter explains the origins of Ajax and the technologies involved. It describes how Ajax developed as the ...

    Beginning Python (2005).pdf

    What Is a Schema/DTD? 278 What Are Document Models For? 278 Do You Need One? 278 Document Type Definitions 278 An Example DTD 278 DTDs Aren’t Exactly XML 280 Limitations of DTDs 280 Schemas ...

    wp-o-matic.1.0RC4.zip

    = What's the benefit of campaigns ? = Campaigns give you the ability to group feeds and select common options for them. So, if you ever decide to change a setting, all the feeds in that logical group...

    Oracle Concepts 中文英文对照版 (10g R2)

    Oracle Concepts 中文版 (10g R2) 订阅 RSS &lt;br&gt;-------------------------------------------------------------------------------- &lt;br&gt; Part I What Is Oracle? 第一部分 何为 Oracle? ...

    Learn Qt 5: with Qt, C++, and QML

    What you will learn Install and configure the Qt Framework and Qt Creator IDE Create a new multi-project solution from scratch and control every aspect of it with QMake Implement a rich user interface...

    Django 1.0 Website Development.pdf

    Adding RSS feeds 170 Creating the recent bookmarks feed 170 Customizing item fields 174 Creating the user bookmarks feed 175 Linking feeds to HTML pages 178 Advanced searching 179 Retrieving ...

    PHP Web 2.0 Mashup Projects.pdf

    Chapter 1 provides an overview of mashups: what a mashup is, and why you would want one. In Chapter 2 we create a basic mashup, and go shopping. We will simply look up products on Amazon....

    Learning Google Apps Script(PACKT,2016)

    Google Apps Script is a cloud-based scripting language based on ...Build Translator and RSS reader applications Develop interactive web pages Design interactive web-forms Form a workflow application

    PHP.and.MySQL.Recipes.A.Problem-Solution.Approach.1484206061

    ...What you hold in your hands is the answer to all your PHP 5 needs.... First, this book is a source of instant solutions, including countless pieces of useful code that you can just copy and paste into ...

    Practical Apache Struts2 Web 2.0 Projects

    Follow along with the introduction of important concepts and development techniques by way of a web site project closely resembling what you might encounter in any enterprise environment. What...

    Zend Framework 2 Application Development

    Filter and validate data no matter what the content is Handle and manage file uploads Gather content from other websites Fight spam with services such as Akismet Pull content from RSS feeds Quickly ...

    Learning.Google.Apps.Script.1785882511

    Build Translator and RSS reader applications Develop interactive web pages Design interactive web-forms Form a workflow application About the Author Ramalingam Ganapathy is an independent computer ...

    ComponentOne Studio for Windows Phone 2012 v3

    RichTextBox for Windows Phone is the only Windows Phone 7 control available which enables rich text editing in both RTF and HTML formats. You can also use the control to display blocks of rich content...

    DDKWizard 安装包及ddkbuild_cmd,ddkbuild_bat(用于DDK开发环境搭建)

    Instead of forcing you to use a subset of options and specific DDKs this wizard lets you choose what you want. Of course the template files are predefined and so is the content of the project(s) ...

    React.Native.Blueprints.epub

    React Native is a game-changing approach to hybrid mobile development. Our book will have a project based approach consisting of 7-8 projects that will help developers to achieve sound understanding...

Global site tag (gtag.js) - Google Analytics