Odd number of arguments in Nokogiri

Hi, I am using Nokogiri for parsing HTML pages.
The gem parses the tags properly only if the tags are properly closed
and also if the attributes are syntacticaly proper. But there seems to
be an issue with parsing if the tags are not properly complete.
For example, in an iframe tag, if the ‘height’ attribute is present but
no value is written for it, then an error occurs saying that “odd number
of arguments for hash”.
Please suggest a solution for this problem.

Have you tried using Nokogiri.Hpricot(open(some_url)) ?

I’ve had the same problem on several sites wrt Nokogiri. I have had to
Hpricot for sites with irregular HTML/XML. Its a pity since Nokogiri IS


On Tue, May 5, 2009 at 12:15 PM, Vikas Maskeri

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs