RSS Feed Implementation Issue


#1

Hi All.

I was pleasantly surprised to see how easy it is to use a Builder
template to format the xml for the RSS feed I’m implementing. There were
lots of helpful example on the Web to follow.

My problem has to do with serving the feed.

The feed is initiated in the rss method in my xml_controller; there’s
also an rss.rxml.

If I point my browser to localhost:3000/xml/rss, the content appears in
xml format and looks just right. But my feed reader chokes when I
give it that URL.

If I point to localhost:3000/xml/rss in my browser and do a “save as
/public/xml/rss.xml”, my feed reader has no trouble finding the file and
displays its contents flawlessly.

Does an actual .xml file really need to be saved somewhere? I didn’t
think that was necessary?

Any hints would be greatly appreciated.

What am I missing?

Thanks,

AOK


#2

On Wednesday 23 Nov 2005 08:47, Andrea O. K. Wright wrote:

If I point my browser to localhost:3000/xml/rss, the content appears in
xml format and looks just right. But my feed reader chokes when I
give it that URL.
Any hints would be greatly appreciated.
What am I missing?

Are you setting the MIME type correctly (in your xml_controller, on the
rss
action)? Should be:

headers[‘Content-Type’] = “application/rss+xml”

~Dave

Dave S.
Rent-A-Monkey Website Development
Web: http://www.rentamonkey.com/


#3

Thank you for your help Dave.

My feed reader was able to read the feed with that format. But when I
use
“application/rss+xml” with Firefox, I get the “Open With\Save As” dialog
when I browse to localhost:3000/xml/rss and IE gives me the message that
it
“cannot download rss from localhost”.

I switched to “application/xml; charset=utf-8” per
http://wiki.rubyonrails.com/rails/pages/HowtoChangeTheContentType. With
this
format both Firefox and IE quietly display the feed content – and the
feed
reader is also fine with the URL “localhost:3000/xml/rss”.

AOK