Skip to Content
Content Syndication with RSS
book

Content Syndication with RSS

by Ben Hammersley
March 2003
Intermediate to advanced
224 pages
6h 27m
English
O'Reilly Media, Inc.
Content preview from Content Syndication with RSS

Creating RSS 1.0 Feeds

Despite the additional complexity of the RDF attributes, the methods for creating RSS 1.0 feeds are similar to those used to create RSS 0.9x feeds (discussed in Chapter 4).

Creating RSS 1.0 with Perl

The XML::RSS module we used in Chapter 4 also works for RSS 1.0, with a few changes to the scripts. Example 6-4 shows a sample script to produce the feed shown in Example 6-5.

Example 6-4. Creating RSS 1.0 with Perl

#!/usr/local/bin/perl -w use XML::RSS; my $rss = new XML::RSS (version => '1.0'); $rss->channel(title => "The Title of the Feed", link => "http://www.oreilly.com/example/", description => "The description of the Feed", dc => { date => "2000-08-23T07:00+00:00", subject => "Linux Software", creator => "scoop@freshmeat.net", publisher => "scoop@freshmeat.net", rights => "Copyright 1999, Freshmeat.net", language => "en-us", }, ); $rss->image(title => "Oreilly", url => "http://meerkat.oreillynet.com/icons/meerkat-powered.jpg", link => "http://www.oreilly.com/example/", dc => { creator => "G. Raphics (graphics at freshmeat.net)", }, ); $rss->textinput(title => "Search", description => "Search the site", name => "query", link => "http://www.oreilly.com/example/search.cgi" ); $rss->add_item( title => "Example Entry 1", link => "http://www.oreilly.com/example/entry1", description => 'blah blah', dc => { subject => "Software", }, ); $rss->add_item( title => "Example Entry 2", link => "http://www.oreilly.com/example/entry2", description => 'blah blah' ); $rss->add_item( ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

How to Build an RSS 2.0 Feed

How to Build an RSS 2.0 Feed

Mark Woodman
What Employees Want Most in Uncertain Times

What Employees Want Most in Uncertain Times

Kristine W. Powers, Jessica B.B. Diaz
Secrets of RSS

Secrets of RSS

Steven Holzner

Publisher Resources

ISBN: 0596003838Catalog PageErrata