# XML/RSS doesn't generate

**URL:** <https://www.ruby-forum.com/t/xml-rss-doesnt-generate/130106>\
**Category:** Rails\
**Created:** [February 25, 2008, 1:44pm UTC](https://www.ruby-forum.com/t/xml-rss-doesnt-generate/130106 "2008-02-25T13:44:25Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![fonziguy](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/f05b48/32.png) [@fonziguy](https://www.ruby-forum.com/u/fonziguy)\
**Post date:** [February 25, 2008, 1:44pm UTC](https://www.ruby-forum.com/t/xml-rss-doesnt-generate/130106/1 "2008-02-25T13:44:25Z")

</div>

Hi guys,

Any ideas why my XML doesn’t generate for an RSS feed? I have the  
following in rss.html.erb

[code=ruby]xml.instruct! :xml, :version =\> “1.0”  
xml.rss :version =\> “2.0” do  
xml.channel do  
xml.title “”  
xml.link “”  
xml.description “”  
xml.language “en-gb”

```
for word in Word.latest_words
  xml.item do
  xml.title word.word
  xml.pubDate word.date_of_purchase
  xml.link word.url
end
end

```

end  
end[/code]  
But when I run this page [http://localhost:3000/words/rss](http://localhost:3000/words/rss), rather than  
generating xml, the page just displays the code as above.

Any suggestions?

---

<div class="post-metadata">

**Author:** ![fonziguy](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/f05b48/32.png) [@fonziguy](https://www.ruby-forum.com/u/fonziguy)\
**Post date:** [February 25, 2008, 5:24pm UTC](https://www.ruby-forum.com/t/xml-rss-doesnt-generate/130106/2 "2008-02-25T17:24:20Z")

</div>

On 25 Feb 2008, at 13:44, Lee M. wrote:

> Any ideas why my XML doesn’t generate for an RSS feed? I have the  
> following in rss.html.erb

rss.rss.builder would be more appropriate and you’re answering a  
format.rss, not format.html.

Best regards

Peter De Berdt
