Hi:
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.
opensearch:totalresults81</opensearch:totalresults>
and
http://cnn.comabc, xyz etc..
I am getting the following error
link:
parse.rb:8: undefined method innerHTML' for nil:NilClass (NoMethodError) 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}: #{results.at(el).innerHTML}”
end
end
any help would be appreciated…