I''m getting an interesting problem. I''d trying to generate an
RSS document
and then real it from outside of my app. Here''s what the view looks
like.
xml.instruct! :xml, :version=>"1.0"
xml.rss(:version=>"2.0"){
xml.channel{
xml.title("mytitle")
xml.link("http://www.myapp.com")
xml.description("mydescription")
xml.language(''en-us'')
for post in @posts
xml.item do
@author = "\"#{post.title}\" by,
#{post.author_name}"
@influence = "Disclosure: #{post.disclosure} [Influence Level:
#{post.influence_level}]"
xml.title(@author)
xml.category(post.influence_level)
xml.description(@influence)
xml.pubDate(post.created_at.rfc2822)
xml.link(post.permalink)
xml.guid(post.permalink)
end
end
}
Here''s the controller.
def rss
@post_pages, @posts = paginate :posts, :per_page => 10, :order =>
''id
DESC''
render :layout => false
end
When I display the file at /mycontroller/rss I get what appears to be the
xml
This XML file does not appear to have any style information
associated with it. The document tree is shown below.
?
<rss version="2.0">
?
<channel>
<title>MyApp</title>
<link>MySite</link>
<description>Mydescription</description>
<language>en-us</language>
?
<item>
?
<title>
Etc...?" by, System Administrator
</title>
<category>1</category>
?
<description>
Etc.... [Influence Level: 1]
</description>
<pubDate>Fri, 21 Jul 2006 07:21:48 -0700</pubDate>
<link>http://www.google</link>
<guid>http://www.google</guid>
</item>
?
<item>
<title>Etc... by, System Administrator</title>
<category>3</category>
?
<description>
Disclosure: Etc.. [Influence Level: 3]
</description>
<pubDate>Wed, 19 Jul 2006 12:33:35 -0700</pubDate>
<link>http://www.google.com</link>
<guid>http://www.google.com</guid>
</item>
?
<item>
<title>Etc.. by, System Administrator</title>
<category>1</category>
?
<description>
Disclosure: Etc... [Influence Level: 1]
</description>
<pubDate>Tue, 18 Jul 2006 11:17:43 -0700</pubDate>
<link>http://www.google.com</link>
<guid>http://www.google.com</guid>
</item>
</channel>
</rss>
But when I try to read it from feedburner it won''t find it, and infact
it
finds this.
This XML file does not appear to have any style information
associated with it. The document tree is shown below.
?
<html>
?
<body>
<h1>Application error (Rails)</h1>
</body>
</html>
Does anyone have any suggestions?
--
View this message in context:
http://www.nabble.com/RSS-XML-Generation-Problem-tf1983528.html#a5444056
Sent from the RubyOnRails Users forum at Nabble.com.