var = 'something'.downcase
doc = Hpricot.parse(open(file_path))
doc.search("//" + var).each do |a|
……
end
即使标签是大写的,var都应该转化成小写!
var = 'something'.downcase
doc = Hpricot.parse(open(file_path))
doc.search("//" + var).each do |a|
……
end
即使标签是大写的,var都应该转化成小写!