![View this Page](../schemes/poor/viewie.gif)
![Edit this Page](../schemes/poor/edit.gif)
![Attachments to this Page](../schemes/poor/upload.gif)
![History of this Page](../schemes/poor/history.gif)
![Home](../schemes/poor/top.gif)
![Recent Changes](../schemes/poor/recent.gif)
![Search the Swiki](../schemes/poor/search.gif)
Working with RSS Feeds
http://today.reuters.com/rss/topNews/ is an RSS (Really Simple Syndication) page listing the top Reuters news information in an XML format. There is some information at the top, then each news story begins with <item> and contains <link> information and sometimes an <image>.
Here's what the top of the page looks like right now:
<?xml version="1.0" encoding="UTF-8" ?><rss version="2.0"><channel><title>Reuters: Top News</title>
<link>http://today.reuters.com/news<description>Reuters: Top News</description><image>
<title>Reuters News</title><width>120</width><height>35</height><link>http://today.reuters.com/news<url>http://today.reuters.com/images/reuters120.gif</url></image>
<item><title>U.S. troops kill 75 insurgents in Iraq offensive</title>
<guid isPermaLink="false">2005-05-09T151659Z_01_N09668277_RTRIDST_0_NEWS-IRAQ-MONDAY-DC.XML</guid>
<link>http://today.reuters.com/news/newsarticle.aspx?type=topNews&storyid=2005-05-09T151659Z_01_N09668277_RTRIDST_0_NEWS-IRAQ-MONDAY-DC.XML</link><pubDate>Mon, 9 May 2005 15:18:06 GMT</pubDate>
<description> BAGHDAD (Reuters) - U.S. troops mounted an offensive in
Iraq's most rebellious province, killing 75 insurgents, but
rebels in Baghdad kept up car bombings on Monday designed to
undermine the new Iraqi government.</description></item>
<item><title>Bush has pride of place at Russian parade</title>
<guid isPermaLink="false">2005-05-09T141336Z_01_L09397502_RTRIDST_0_NEWS-EUROPE-WAR-BUSH-DC.XML</guid>
<link>http://today.reuters.com/news/newsarticle.aspx?type=topNews&storyid=2005-05-09T141336Z_01_L09397502_RTRIDST_0_NEWS-EUROPE-WAR-BUSH-DC.XML</link><pubDate>Mon, 9 May 2005 15:17:39 GMT</pubDate>
<description> MOSCOW (Reuters) - President Bush and Kremlin leader
Vladimir Putin put on their own show of bonhomie at Monday's
grand military parade on Red Square, setting aside political
strains as they smiled and chatted like old friends.</description></item>
You are to write a function (named "makeSummary") that will take a directory as input then:
- YOUR PROGRAM will visit http://today.reuters.com/rss/topNews/ and pick out the top FIVE news stories headlines.
- Generate a NEW HTML page named "personalNews.html" in the input directory that lists the top five headlines as <h1> headings and the descriptions of those news items as paragraphs. You must also include an <image> link to at least one image listed in the RSS news feed.
Links to this Page