Forum: Ruby on Rails Hpricot

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
01e3244506463e86e6c80fab00f19c60?d=identicon&s=25 Andrew Jonson (Guest)
on 2007-01-04 15:12

Anyone had any luck with parsing Amazon Open Search XML using Hpricot?..
I am having touble with the following types (tags with : and /) of Open
Search XML tags..i.e.


<link />
<br /> abc, xyz etc..

I am getting the following error

parse.rb:8: undefined method `innerHTML' for nil:NilClass
        from parse.rb:7:in `each'
        from parse.rb:7
        from parse.rb:6:in `each'

Can Hpricot handle above types of XML.. I am not doing anything strange
as far as i can see .. a bit of code snippet..

(doc/:item).each do |results|
  ['title', 'description', 'link', 'opensearch:site'].each do |el|
    puts "#{el}: #{}"

any help would be appreciated..
This topic is locked and can not be replied to.