FeedTools problem

Discussion in 'Ruby' started by Kev Jackson, Dec 14, 2005.

  1. Kev Jackson

    Kev Jackson Guest

    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
    Kev Jackson, Dec 14, 2005
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Bob Aman

    [ANN] FeedTools 0.2.3

    Bob Aman, Aug 12, 2005, in forum: Ruby
    Replies:
    0
    Views:
    99
    Bob Aman
    Aug 12, 2005
  2. Alex  Castro
    Replies:
    0
    Views:
    140
    Alex Castro
    Dec 31, 2005
  3. Ray Chen

    FeedTools

    Ray Chen, Jul 27, 2006, in forum: Ruby
    Replies:
    6
    Views:
    146
    Bob Aman
    Jul 28, 2006
  4. Robert Jones
    Replies:
    4
    Views:
    91
    Suraj Kurapati
    Dec 26, 2006
  5. Bryan W.

    FeedTools and mime types

    Bryan W., Jan 9, 2007, in forum: Ruby
    Replies:
    0
    Views:
    109
    Bryan W.
    Jan 9, 2007
Loading...

Share This Page