[#3228] Core support for Gems, and namespace — "Luke A. Kanies" <luke@...>

Hi all,

21 messages 2004/07/27
[#3230] Re: Core support for Gems, and namespace — Austin Ziegler <halostatue@...> 2004/07/27

On Tue, 27 Jul 2004 11:39:08 +0900, Luke A. Kanies <luke@madstop.com> wrote:

[#3234] Re: Core support for Gems, and namespace — "Luke A. Kanies" <luke@...> 2004/07/27

On Tue, 27 Jul 2004, Austin Ziegler wrote:

[#3238] Re: Core support for Gems, and namespace — Austin Ziegler <halostatue@...> 2004/07/27

On Wed, 28 Jul 2004 00:14:29 +0900, Luke A. Kanies <luke@madstop.com> wrote:

Problem in RSS library, or problem in my blog :)

From: Dave Thomas <dave@...>
Date: 2004-07-01 04:19:20 UTC
List: ruby-core #3113
I've been trying to use the new RSS library to parse a number of 
popular blogs. So far, many of them cannot be read, as they fail 
validation. I've tried ones with RDF 0.91, RSS 1, and RSS 2. (Having 
said that, Ruby-lang/en/index.rss _does_ parse successfully.)

For example, my blog's feed starts:

<?xml version="1.0" encoding="iso-8859-1" ?>
<!DOCTYPE rss PUBLIC "-//Netscape Communications//DTD RSS 0.91//EN"
                      
"http://my.netscape.com/publish/formats/rss-0.91.dtd">
<rss version="0.91">
<channel>
   <title>PragDave</title>
   <link>http://www.pragprog.com/pragdave</link>
   <description>Dave's Weblog: Pragmatic Programming.</description>
   <language>en-us</language>
   <item>
     <title>Reasons to Like Scripting Languages, #134</title>
     <link>http://www.pragprog.com/pragd

When I run a parse against it:

   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
   end

I see:

/usr/lib/ruby/1.9/rss/rss.rb:556:in `_validate': tag <title> 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/net/http.rb:328:in `start'
         from code/rss/read.rb:4

Reading the Netscape 0.91 RDF document, the blog looks OK.




Cheers

Dave


In This Thread

Prev Next