# RSS::Parser Documentation

**URL:** <https://www.ruby-forum.com/t/rss-parser-documentation/96640>\
**Category:** Rails\
**Created:** [June 30, 2006, 12:37pm UTC](https://www.ruby-forum.com/t/rss-parser-documentation/96640 "2006-06-30T12:37:23Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![daveverwer](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/b4bc9f/32.png) [@daveverwer](https://www.ruby-forum.com/u/daveverwer)\
**Post date:** [June 30, 2006, 12:37pm UTC](https://www.ruby-forum.com/t/rss-parser-documentation/96640/1 "2006-06-30T12:37:23Z")

</div>

Hi

I am trying to use the RSS classes from “rss/2.0” and everything works  
but I want to know what attributes and properties I can get at from each  
of the classes I am getting back.

For example, the class has a “channel” which I can tell has a “title”  
attribute (because it works when I query it 🙂 but I would really like a  
list of every attribute that is supported!

I found documentation for it here:  
[http://www.ruby-doc.org/stdlib/libdoc/rss/rdoc/](http://www.ruby-doc.org/stdlib/libdoc/rss/rdoc/)

But unless I am missing it, taking the example I used before and looking  
at the doc for RSS::Rss::Channel:  
[http://www.ruby-doc.org/stdlib/libdoc/rss/rdoc/classes/RSS/Rss/Channel.html](http://www.ruby-doc.org/stdlib/libdoc/rss/rdoc/classes/RSS/Rss/Channel.html)

It doesnt tell me the basics like what attributes and methods it has. Am  
I missing something? What is the best way at getting at this information  
or am I going to have to plough through the source?

Dave

---

<div class="post-metadata">

**Author:** ![daveverwer](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/b4bc9f/32.png) [@daveverwer](https://www.ruby-forum.com/u/daveverwer)\
**Post date:** [June 30, 2006, 12:55pm UTC](https://www.ruby-forum.com/t/rss-parser-documentation/96640/2 "2006-06-30T12:55:47Z")

</div>

I haven’t used the RSS/2.0 lib, I am using the FeedTools plugin and so  
far it  
works perfectly for the feeds I have tested.

The problem you are asking is a generic one, like how can I discover  
what  
methods are available for an object. You can ask the object itself,  
“object.methods” will list all methods. Coming from the Java world  
sometimes  
I miss the “.” 😉 But Ruby brought the fun back 🙂

Generally I play with the “ruby console” to play with the objects and it  
helps quickly to discover what’s there and how to use it.

## \_Hari

View this message in context:  
[http://www.nabble.com/RSS%3A%3AParser-Documentation-tf1872507.html#a5118388](http://www.nabble.com/RSS%3A%3AParser-Documentation-tf1872507.html#a5118388)  
Sent from the RubyOnRails Users forum at [Nabble.com](http://Nabble.com).

---

<div class="post-metadata">

**Author:** ![daveverwer](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/b4bc9f/32.png) [@daveverwer](https://www.ruby-forum.com/u/daveverwer)\
**Post date:** [June 30, 2006, 1:27pm UTC](https://www.ruby-forum.com/t/rss-parser-documentation/96640/3 "2006-06-30T13:27:09Z")

</div>

Thanks for the response Nari, I have tried that but taking my example  
above… is this really the best documentation I can get for these  
inbuilt classes:

=\> ["==", “===”, “=~”, “ **id** ”, “ **send** ”, “`”, “b64encode”, “blank?”,  
“categories”, “category”, “category=”, “class”, “clone”, “cloud”,  
“cloud=”, “convert”, “converter=”, “copy\_instance\_variables\_from”,  
“copyright”, “copyright=”, “daemonize”, “date”, “date=”, “dclone”,  
“decode64”, “decode\_b”, “description”, “description=”, “display”,  
“do\_validate”, “do\_validate=”, “docs”, “docs=”, “dup”,  
“enable\_warnings”, “encode64”, “eql?”, “equal?”, “extend”,  
“extend\_with\_included\_modules\_from”, “extended\_by”, “freeze”, “frozen?”,  
“full\_name”, “generator”, “generator=”, “hash”, “id”, “image”, “image=”,  
“indent\_size”, “inspect”, “instance\_eval”, “instance\_exec”,  
“instance\_of?”, “instance\_values”, “instance\_variable\_get”,  
“instance\_variable\_set”, “instance\_variables”, “is\_a?”, “item”, “item=”,  
“items”, “kind\_of?”, “language”, “language=”, “lastBuildDate”,  
“lastBuildDate=”, “link”, “link=”, “load”, “managingEditor”,  
“managingEditor=”, “method”, “methods”, “nil?”, “object\_id”,  
“other\_element”, “private\_methods”, “protected\_methods”, “pubDate”,  
“pubDate=”, “public\_methods”, “rating”, “rating=”,  
“remove\_subclasses\_of”, “require”, “require\_gem”,  
“require\_gem\_with\_options”, “require\_library\_or\_gem”, “respond\_to?”,  
“returning”, “send”, “set\_category”, “set\_item”, “setup\_maker”,  
“silence\_stderr”, “silence\_stream”, “silence\_warnings”,  
“singleton\_methods”, “skipDays”, “skipDays=”, “skipHours”, “skipHours=”,  
“subclasses\_of”, “suppress”, “tag\_name”, “taguri”, “taguri=”, “taint”,  
“tainted?”, “textInput”, “textInput=”, “title”, “title=”, “to\_a”,  
“to\_json”, “to\_s”, “to\_yaml”, “to\_yaml\_properties”, “to\_yaml\_style”,  
“ttl”, “ttl=”, “type”, “untaint”, “validate”, “validate\_for\_stream”,  
“webMaster”, “webMaster=”, “with\_options”]

Ok that does technically give me the name of all methods I can call but  
it contains no description of them whatsoever and sure, I can figure out  
that title is the title of the feed but (and this is just an example)  
what is skipHours ?, ok so I could call it to try and get more  
information but all it tells me is “nil”.

This cant be the best documentation available for these classes, can it?

---

<div class="post-metadata">

**Author:** ![daveverwer](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/b4bc9f/32.png) [@daveverwer](https://www.ruby-forum.com/u/daveverwer)\
**Post date:** [July 10, 2006, 9:50pm UTC](https://www.ruby-forum.com/t/rss-parser-documentation/96640/4 "2006-07-10T21:50:18Z")

</div>

> I also found this now:  
> [http://www.cozmixng.org/~rwiki/?cmd=view;name=RSS+Parser%3A%3ATutorial.en](http://www.cozmixng.org/~rwiki/?cmd=view;name=RSS+Parser%3A%3ATutorial.en)
> 
> Which is fantastic, but as you say this is a generic problem and while  
> that will solve my current issue I know that there isnt a document of  
> this standard available for most of these classes.

Dave, unless you’re not planning on supporting Atom feeds or RSS 1.0  
feeds (very likely a mistake unless you’re only looking to parse one  
or two feeds which you happen to be the publisher of) the ‘rss/2.0’  
code isn’t likely to be a good choice. If the feeds you’re parsing  
happen to become invalid (happens all the time) your site may break if  
you’re using ‘rss/2.0’ to parse. SimpleRSS or FeedTools are both  
better ways to go, IMHO, depending on whether you need speed or  
accuracy, respectively.

(Disclaimer: Obviously, I wrote FeedTools, so I’m biased.)

## Cheers, Bob A.

AIM: sporkmonger  
Jabber: removed\_email\_address@domain.invalid

---

<div class="post-metadata">

**Author:** ![daveverwer](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/b4bc9f/32.png) [@daveverwer](https://www.ruby-forum.com/u/daveverwer)\
**Post date:** [June 30, 2006, 1:33pm UTC](https://www.ruby-forum.com/t/rss-parser-documentation/96640/5 "2006-06-30T13:33:52Z")

</div>

I also found this now:  
[http://www.cozmixng.org/~rwiki/?cmd=view;name=RSS+Parser%3A%3ATutorial.en](http://www.cozmixng.org/~rwiki/?cmd=view;name=RSS+Parser%3A%3ATutorial.en)

Which is fantastic, but as you say this is a generic problem and while  
that will solve my current issue I know that there isnt a document of  
this standard available for most of these classes.

---

<div class="post-metadata">

**Author:** ![daveverwer](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/b4bc9f/32.png) [@daveverwer](https://www.ruby-forum.com/u/daveverwer)\
**Post date:** [July 10, 2006, 10:56pm UTC](https://www.ruby-forum.com/t/rss-parser-documentation/96640/6 "2006-07-10T22:56:39Z")

</div>

> Hi Bob
> 
> Since writing this post, you will be pleased to know I have switched to  
> FeedTools 🙂 I have even taken on board FeedUpdater and I have just  
> finished integrating that with my existing code. I might IM you or  
> something soon because I have a requirement of the updater which if you  
> also like the idea, I might try and submit as a patch to you.
> 
> Dave

Hehe, alright. Go for it, patches are always welcome.

## Cheers, Bob A.

AIM: sporkmonger  
Jabber: removed\_email\_address@domain.invalid

---

<div class="post-metadata">

**Author:** ![daveverwer](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/b4bc9f/32.png) [@daveverwer](https://www.ruby-forum.com/u/daveverwer)\
**Post date:** [July 10, 2006, 10:13pm UTC](https://www.ruby-forum.com/t/rss-parser-documentation/96640/7 "2006-07-10T22:13:33Z")

</div>

Bob A. wrote:

> Dave, unless you’re not planning on supporting Atom feeds or RSS 1.0  
> feeds (very likely a mistake unless you’re only looking to parse one  
> or two feeds which you happen to be the publisher of) the ‘rss/2.0’  
> code isn’t likely to be a good choice. If the feeds you’re parsing  
> happen to become invalid (happens all the time) your site may break if  
> you’re using ‘rss/2.0’ to parse. SimpleRSS or FeedTools are both  
> better ways to go, IMHO, depending on whether you need speed or  
> accuracy, respectively.

Hi Bob

Since writing this post, you will be pleased to know I have switched to  
FeedTools 🙂 I have even taken on board FeedUpdater and I have just  
finished integrating that with my existing code. I might IM you or  
something soon because I have a requirement of the updater which if you  
also like the idea, I might try and submit as a patch to you.

Dave
