Warning

 

Close

Confirm Action

Are you sure you wish to do this?

Confirm Cancel
Member Login
Posted: 4/7/2006 9:10:58 PM EDT
I've written a groovy program in C++ to import a text file and turn it into a stream of RSS feeds. However, I don't know how to test it. I don't have anyplace to host the feed itself and was wondering if there was a way to read the .rss file from a location on my hard drive?

I'm trying to use the SAGE extension for FireFox but I can't seem to figure it out.
Link Posted: 4/7/2006 9:24:47 PM EDT
Just make a simple HTML document and embed the RSS file into it by putting this tag in the <head>

<link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="path/to/feed.xml" />
Link Posted: 4/7/2006 9:30:18 PM EDT
[Last Edit: 4/7/2006 9:31:36 PM EDT by roboman]

Originally Posted By daveisadork:
Just make a simple HTML document and embed the RSS file into it by putting this tag in the <head>

<link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="path/to/feed.xml" />



Path isn't working for some reason. I haven't used HTML in ages.

ETA: Yes, I changed the href to the file location.

Any other ideas?
Link Posted: 4/7/2006 9:42:12 PM EDT
[Last Edit: 4/7/2006 9:46:32 PM EDT by daveisadork]
Try pasting this into a blank file:

<html>
<head>
<title>RSS Feed Test</title>
<link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="path/to/feed.xml" />
</head>
<body>
Nothing to see here...
</body>
</html>

ETA: For the path, just make sure the feed is in the same directory as the html file and put just the filename in there.
Link Posted: 4/7/2006 9:45:22 PM EDT

Originally Posted By daveisadork:
Try pasting this into a blank file:

<html>
<head>
<title>RSS Feed Test</title>
<link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="path/to/feed.xml" />
</head>
<body>
Nothing to see here...
</body>
</html>



Hmm, tried it and no luck. Could be my actual RSS feed creator is shot.

Here's what it's outputting though:


<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
<channel>
<title>TLC News</title>
<link>http://tlc.discovery.com/news/news.html</link>
<description>Get the latest news and information on attractions, developments, trends, sites and events worldwide.</description>
</channel>
<item>
<title>Laser Makes Solids Transparent</title>
<link>http://tlc.discovery.com/news/afp/20060320/laser.html?source=rss</link>
<description>The beam of light could some day help see through rubble or body parts.</description>
Fri, Mar 24, 2006 15:56
</item>
<item>
<title>Pocket Printer Handles Email</title>
<link>http://tlc.discovery.com/news/afp/20060320/printer.html?source=rss</link>
<description>The mobile-phone-sized printer spits out messages for the technophobe or the email-obsessed.</description>
Thu, Mar 23, 2006 15:56
</item>
<item>
<title>Malaysian Makes Hissstory with Snake-Kissing</title>
<link>http://tlc.discovery.com/news/afp/20060320/snake.html?source=rss</link>
<description>A snake farm worker may have set a new world record after kissing a poisonous snake 51 times in three minutes.</description>
Mon, Mar 20, 2006 17:05
</item>
<item>
<title>Many Irish Names Not so Irish?</title>
<link>http://tlc.discovery.com/news/afp/20060313/irishname.html?source=rss</link>
<description>The English and the Normans, who invaded Ireland, led to radical changes in the way Irish families named kids.</description>
Wed, Mar 15, 2006 17:05
</item>
</rss>
Link Posted: 4/7/2006 9:53:19 PM EDT
[Last Edit: 4/7/2006 9:55:02 PM EDT by mattja]
It appears your XML is for not formatted to the RSS 2.0 spec.

All of the Item nodes should be child nodes of the channel node.

Here is an example RSS 2.0 doc.

www.rssboard.org/files/sample-rss-2.xml

Here's the spec.

www.rssboard.org/rss-specification
Top Top