# FeedTools problem

**URL:** <https://www.ruby-forum.com/t/feedtools-problem/50205>\
**Category:** Ruby\
**Created:** [December 14, 2005, 4:49am UTC](https://www.ruby-forum.com/t/feedtools-problem/50205 "2005-12-14T04:49:30Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kev\_J](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/2bfe46/32.png) [@Kev\_J](https://www.ruby-forum.com/u/Kev_J)\
**Post date:** [December 14, 2005, 4:49am UTC](https://www.ruby-forum.com/t/feedtools-problem/50205/1 "2005-12-14T04:49:30Z")

</div>

Hi all,

I’m trying to build an rss xml file from a set of data and all I’m  
getting back is the raw text, instead of the expected xml. The tutorial  
is fairly slim and only really explains reading rather than generating  
feeds, so I’m stuck with the API and that suggests that the method I  
want is build\_xml, but as I metioned previously all I’m getting is the  
text, code follows:

# setting up the “feed” inside RssController

def activities  
activities = get\_activities  
@feed = FeedTools::Feed.new  
@feed.title = “Activities”  
@feed.author = “Cogini”  
@feed.copyright = “Cogini 2005-2006”  
@feed.time = Time.new  
activities.each do |a|  
@feed.content = activity\_link(a)  
end  
end

# view inside activities.rxml

@feed.build\_xml(“rss”, 0.0, activities)

This is all being run inside Rails, I’m going to experiment in irb to  
try and get anything working at all, but any help on this would be  
appreciated

Kev
