Looping problem

require ‘rubygems’
require ‘nokogiri’
require ‘rexml/document’
include REXML

doc1=Nokogiri::HTML(open(‘Delhi.txt’))

builder = Nokogiri::HTML::Builder.new do |doc|

doc.html {

       doc.landmark {
 doc1.search('//span').each do |x|
      doc.text x.inner_text
      end
 doc1.search('//b').each do |y|
      doc.landname y.inner_text
      end
    }

    }

end

puts builder.to_html

</html

but i am getting like

CAN anybody help me to correct it

Regards
prashanth

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