From: David Masover Date: 2009-03-26T04:42:03+09:00 Subject: Re: Parsing xml Phlip wrote: >> Or you could explain that REXML is not an _external_ library. It >> comes with Ruby, so it's "free" to use. You never need to download >> and install it... > > Next, REXML will break if you point it at nearly any website. Except the question was about XML, not HTML. And the document indicated: http://www.shoe-g.com/index.rdf seems to parse fine with rexml: irb(main):001:0> require 'open-uri' => true irb(main):002:0> require 'rexml/document' => true irb(main):003:0> open('http://www.shoe-g.com/index.rdf'){|f| REXML::Document.new f} => ... irb(main):004:0> _.root => ... I'll second Nokogiri, but I think we agree on the main point: Use a library. Any library. The world does not need another hacked-together, home-grown, broken XML parser.