From: Dave Thomas Date: 2004-07-04T12:58:24+09:00 Subject: Re: Problem in RSS library, or problem in my blog :) On Jul 3, 2004, at 22:10, Kouhei Sutou wrote: > RSS Parser only supports validation for RSS 1.0. Other > versions of RSS aren't supported because of RSS Parser's > validator can't handle interleave pattern (and I don't like > them.) So validation for RSS 1.0 only supports standard > order RSS. (But RSS 1.0 specification says element order is > not important.) But my blog is 0.9, and the RSS library still can't read it. If I understand your message, the library shouldn't be doing validation, but it seems that it is. Am I calling it incorrectly? dave[code/rss 22:56:28] cat pp.rb require 'rss/0.9' require 'net/http' Net::HTTP.start('pragprog.com') do |http| response = http.get('/pragdave/index.rss') fail response.code unless response.code == "200" rss = RSS::Parser.new(response.body) result = rss.parse puts "Channel: " + result.channel.title result.items.each_with_index do |item, i| puts "#{i+1}. #{item.title}" end end dave[code/rss 22:56:33] ruby pp.rb /usr/lib/ruby/1.9/rss/rss.rb:556:in `_validate': tag is missing in tag <channel> (RSS::MissingTagError) from /usr/lib/ruby/1.9/rss/rss.rb:503:in `each_with_index' from /usr/lib/ruby/1.9/rss/rss.rb:503:in `each' from /usr/lib/ruby/1.9/rss/rss.rb:503:in `each_with_index' from /usr/lib/ruby/1.9/rss/rss.rb:503:in `_validate' from /usr/lib/ruby/1.9/rss/rss.rb:473:in `send' from /usr/lib/ruby/1.9/rss/rss.rb:473:in `__validate' from /usr/lib/ruby/1.9/rss/rss.rb:472:in `each' from /usr/lib/ruby/1.9/rss/rss.rb:472:in `__validate' ... 8 levels... from pp.rb:10 from pp.rb:4:in `start' from /usr/lib/ruby/1.9/net/http.rb:328:in `start' from pp.rb:4 dave[code/rss 22:56:46] Cheers Dave