Developing Feeds with RSS and Atom: Developers Guide to Syndicating News & Blogs 1st Edition, Digital Edition
by Ben Hammersley (Author)
Perhaps the most explosive technological trend over the past two years has been blogging. As a matter of fact, it’s been reported that the number of blogs during that time has grown from 100,000 to 4.8 million-with no end to this growth in sight.What’s the technology that makes blogging tick? The answer is RSS–a format that allows bloggers to offer XML-based feeds of their content. It’s also the same technology that’s incorporated into the websites of media outlets so they can offer material (headlines, links, articles, etc.) syndicated by other sites.As the main technology behind this rapidly growing field of content syndication, RSS is constantly evolving to keep pace with worldwide demand. That’s where Developing Feeds with RSS and Atom steps in. It provides bloggers, web developers, and programmers with a thorough explanation of syndication in general and the most popular technologies used to develop feeds.This book not only highlights all the new features of RSS 2.0-the most recent RSS specification-but also offers complete coverage of its close second in the XML-feed arena, Atom. The book has been exhaustively revised to explain:
- metadata interpretation
- the different forms of content syndication
- the increasing use of web services
- how to use popular RSS news aggregators on the market
After an introduction that examines Internet content syndication in general (its purpose, limitations, and traditions), this step-by-step guide tackles various RSS and Atom vocabularies, as well as techniques for applying syndication to problems beyond news feeds. Most importantly, it gives you a firm handle on how to create your own feeds, and consume or combine other feeds.If you’re interested in producing your own content feed, Developing Feeds with RSS and Atom is the one book you’ll want in hand.
Product description
Review
“Hammersley’s pevious RSS book was seminal, this one is definitive.” – Davey Winder, PC Plus, September (PC Plus Editor’s Choice) 9/10
Perhaps the most explosive technological trend over the past two years has been blogging. As a matter of fact, it’s been reported that the number of blogs during that time has grown from 100,000 to 4.8 million-with no end to this growth in sight. What’s the technology that makes blogging tick? The answer is RSS – a format that allows bloggers to offer XML-based feeds of their content. It’s also the same technology that’s incorporated into the websites of media outlets so they can offer material (headlines, links, articles, etc.) syndicated by other sites. As the main technology behind this rapidly growing field of content syndication, RSS is constantly evolving to keep pace with worldwide demand. That’s where Developing Feeds with RSS and Atom, 2nd Edition steps in. It provides bloggers, web developers, and programmers with a thorough explanation of syndication in general and the most popular technologies used to develop feeds. This book not only highlights all the new features of RSS 2.0-the most recent RSS specification-but also offers complete coverage of its close second in the XML-feed arena, Atom.The book has been exhaustively revised to explain: – metadata interpretation – the different forms of content syndication – the increasing use of web services – how to use popular RSS news aggregators on the market After an introduction that examines Internet content syndication in general (its purpose, limitations, and traditions), this step-by-step guide tackles various RSS and Atom vocabularies, as well as techniques for applying syndication to problems beyond news feeds. Most importantly, it gives you a firm handle on how to create your own feeds, and consume or combine other feeds. If you’re interested in producing your own content feed, Developing Feeds with RSS and Atom is the one book you’ll want in hand.
About the Author
Ben Hammersley is a journalist, technologist, and broadcaster. As a foreign reporter, he has worked in Iran, Afghanistan, Burma, and Beirut. As a technologist he has written books for O’Reilly and others, built sites for the Guardian and the BBC, and consulted for the UK government. He is principal of Dangerous Precedent Ltd, and Associate Editor of the UK edition of Wired.
—Dorothy L. Sayers, Lord Peter Wimsey in Gaudy NightThis chapter describes the RSS 2.0 specification in detail, how it works, and how it is created. It also explores RSS 2.0 predecessors—the largely compatible 0.91 and 0.92 specifications—and how they relate and can be converted to the latest standard.Bringing Things Up to DateRSS 2.0 has a long history. As was shown in Chapter 1, it’s based on a succession of specifications: RSS 0.91, 0.92, 0.93, and 0.94. Because of this history and because of a lack of any adequate documentation for many of these standards, there is a massive gulf between the quality of the document you can produce and the quality of what you might have to parse. In other words, many people are doing it wrong.This confusion forces this chapter to address two different issues. The first is how to create a perfectly specification-compliant feed, and the second is how to deal with feeds produced by those with less exacting standards.This decision brings us to another one: what to do about the older versions that led to 2.0? The answer is this: although many people are still learning to produce 0.91, 0. 91, et al, we will not. You’ll learn how to parse them, but from now on, as far as the simple strain of syndication feeds goes, we’ll be creating only 2.0 feeds.With that decided, steel yourself, visit the official specification document for RSS 2.The Basic StructureThe top level of an RSS 2.0 document is the rss version=”2.0″ element. This is followed by a single channel element. The channel element contains the entire feed contents and all associated metadata.Required Channel Sub-elementsThere are 3 required and 16 optional sub-elements of channel within RSS 2.0. Here are the required sub-elements:title
The name of the feed. In most cases, this is the same name as the associated web site or service.RSS and Atom
link
A URL pointing to the associated resource, usually a web site.description
Some words to describe your channel.
This is a nice RSS 2.0 feed of an even nicer weblog
Although it isn’t explicitly stated in the specification, it is highly recommended that you do not put anything other than plain text in the channel/title or channel/description elements. There are some existing feeds with HTML within those elements, but these cause a considerable amount of wailing, and at least a small amount of gnashing of teeth. Do not do it. Use plain text only in these elements. The following sidebar, “Including HTML Within title or description,” gives a fuller account of this, but in my opinion it’s a bad idea.
Optional Channel Subelements
There are 16 optional channel subelements of RSS 2.0. Technically speaking, you can leave these out altogether. However, I encourage you to add as many as you can. Much of this stuff is static; the content of the element never changes. Placing it into your RSS template or adding another line to a script is little work for the additional value of your feed’s metadata. This is especially true for the first three subelements listed here:
language
The language the feed is written in. This allows aggregators to index feeds by language and should contain the standard Internet language codes as per RFC 1766.
en-US
copyright
A copyright notice for the content in the feed:
pubDate
The publication date of the content within the feed. For example, a daily morning newspaper publishes at a certain time early every morning. Technically, any information in the feed should not be displayed until after the publication date, so you can set pubDate to a time in the future and expect that the feed won’t be displayed until after that time. Few existing RSS readers take any notice of this element in this way, however. Nevertheless, it should be in the format outlined in RFC 822:
Sun, 12 Sep 2004 19:00:40 GMT
lastBuildDate
The date and time, RFC 822–style, when the feed last changed. Note the difference between this and channel/pubDate. lastBuildDate must be in the past. It is this element that feed applications should take as the “last time updated” value and not channel/pubDate.
Sun, 12 Sep 2004 19:01:55 GMT
category
Identical in syntax to the item/category element you’ll see later. This takes one optional attribute, domain. The value of category should be a forward-slash-separated string that identifies a hierarchical location in a taxonomy represented by the domain attribute. Sadly, there is no consensus either within the specification or in the real world as to any standard format for the domain attribute. It would seem most sensible to restrict it to a URL; however, it needn’t necessarily be so.
1765
generator
This should contain a string indicating which program created the RSS file:
Movable Type v3.1b3
More about the author;
Biography
Reviews
There are no reviews yet.