# RSS Parser 0.1.7

**URL:** <https://www.ruby-forum.com/t/rss-parser-0-1-7/89114>\
**Category:** Ruby\
**Created:** [March 17, 2007, 12:24pm UTC](https://www.ruby-forum.com/t/rss-parser-0-1-7/89114 "2007-03-17T12:24:55Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kouhei\_S](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/f4b2a3/32.png) [@Kouhei\_S](https://www.ruby-forum.com/u/Kouhei_S)\
**Post date:** [March 17, 2007, 12:24pm UTC](https://www.ruby-forum.com/t/rss-parser-0-1-7/89114/1 "2007-03-17T12:24:55Z")

</div>

Hi,

I released RSS Parser 0.1.7:  
[http://raa.ruby-lang.org/project/rss/](http://raa.ruby-lang.org/project/rss/)

Here are new features:

- Atom support
- (official) DublinCore module with RSS 2.0 support
- New convenience methods to convert feed type: to\_xml,  
to\_feed, to\_rss, to\_atom and to\_xml.

Here are changes:

- dc\_rightses → dc\_rights\_list: Thanks to Mathieu Bouchard!
- Stop ruby 1.6.x support

= Details

== Atom support

Atom support means the followings:

- RSS::Parser.parse can parse Atom feed document with  
validation.
- RSS::Parser.parse can parse Atom entry document with  
validation.
- RSS::Maker.make can make Atom feed document.
- RSS::Maker.make can make Atom entry document.

To support Atom, I changed the following reading APIs of RSS  
Maker:

- maker.channel.title
- maker.channel.description
- maker.channel.copyright
- item.title
- item.link
- item.description
- item.rights

They return a String or nil since 0.1.6. But They always  
return an object.

I think this change doesn’t have big impact because most of  
users don’t use them. They always use only writer APIs.

== DublinCore module with RSS 2.0 support

RSS Parser parses DublinCore module in RSS 2.0 now  
officially. We need to require some files. We can just write  
the following:

require ‘rss’  
feed = RSS::Parser.parse(…)

== Feed conversion

We can convert RSS 1.0 to RSS 2.0 by the following code:

rss20 = rss10.to\_rss(“2.0”)

We can convert RSS 1.0 to Atom feed document by the  
following code:

feed = rss10.to\_atom(“feed”)

But you may need to set some values required by returned  
feed type but not required by converted feed. For example,  
/rss/item/title isn’t required value in RSS 2.0 but  
/rdf:RDF/item/title is required value in RSS 1.0. In the  
situation, we can set default value like the following:

rss10 = rss20.to\_rss(“1.0”) do |maker|  
maker.items.each do |item|  
item.title.content ||= “Default Title”  
end  
end

Thanks,
