Randy R
2/2/2009 9:56:00 AM
I've been considering switching to Nokogiri instead of Hpricot, mostly
'cause Mechanize has switched. However, the two actually behave quite
differently. The Nokogiri objects don't simulate standard container
behavior nearly as well as Hpricot. I also noticed that this:
require 'nokogiri'
require 'hpricot'
xml = '<first look="Big & small...">content</first>'
doc = Nokogiri::XML(xml)
puts doc.search('first')[0].attributes['look']
doc = Hpricot(xml)
puts doc.search('first')[0].attributes['look']
...produces this output:
Big & small...
Big & smal...
I don't know which output is the correct one. Does anyone know what's
going on here?
Thank you...