Manish
Manish

Reputation: 6286

RSS file not rendering as expected in firefox!

I have an rss XML file:

<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
    <channel>
        <title>ABC News</title>
        <link></link>
        <description></description>
        <copyright></copyright>
        <lastBuildDate>Mon, 26 Oct 2009 17:49:44 +05-30</lastBuildDate>
        <generator>Super Simple RSS</generator>
        <webMaster></webMaster>
        <item>
            <title>Get Visual Studio</title>
            <link>http://www.visual-studio.com</link>
            <description>
                &lt;hr&gt;&lt;/hr&gt;
            </description>          
        </item>
        <item>
            <title>Get Windows 7</title>
            <link>http://www.windows7.com</link>
            <description>
                Enter Text Here
            </description>          
        </item>
    </channel>
</rss>

It renders properly in IE but not in firefox. Firefox displays a message "This XML file does not appear to have any style information associated with it. The document tree is shown below." and renders it as a XML tree. But on IE, it renders as I want.

alt text http://img188.imageshack.us/img188/4980/rssoz.jpg

Can't even guess how is it working on IE. Please help. Am I missing something?

Upvotes: 1

Views: 2063

Answers (3)

Manish
Manish

Reputation: 6286

Hey...got the answer....it was the <link></link> which was creating the problem. The value for the node is required in Firefox... Looks weired but solves my problem !! :-)

Upvotes: 0

jldupont
jldupont

Reputation: 96716

Maybe you should consider the advices of W3C Feed Validation Service and then specify a style sheet for helping render the page when viewed as a web page.

Upvotes: 1

Adam Wright
Adam Wright

Reputation: 49376

Well, RSS is just a schema for the encoding of syndicatable information - it doesn't give any display semantics at all. The reason it seems to work is that IE has a builtin transform to HTML for RSS feeds (as does Safari), so they convert the RSS into something more human friendly. Firefox, by default does not.

You can fix this by providing your own XSLT file that gives a specific RSS->XHTML transformation, so that all browsers will display the same result.

Upvotes: 1

Related Questions