title: nokogiri only return one item
body: <p>I call the method "<strong>read</strong>" and only return one item from xml file</p>
  
  <p>the method "<strong>read</strong>" return:</p>
  
  <pre><code>9
  3
  max
  date
  5
  </code></pre>
  
  <p>and should return all items from xml </p>
  
  <p>how do I get the whole xml from the method read?</p>
  
  <pre><code>require 'nokogiri'
  require 'open-uri'
  
  def create
    var = 0  
    while var &lt; 10
      builder = Nokogiri::XML::Builder.new do 
        item {
          data var
          port '3'
          length 'max'
          date 'date'
          limit '5'
        }
        var += 1  
      end
    end
    return Nokogiri::XML(builder.to_xml).root.to_xml
  end
  
  def read    
    doc = Nokogiri::XML(create)
    doc.xpath('//item').each do |item|
      data = item.at_xpath('./data').content
      port = item.at_xpath('./port').content
      length = item.at_xpath('./length').content
      date = item.at_xpath('./date').content
      limit = item.at_xpath('./limit').content
  
      puts data
      puts port
      puts length
      puts date
      puts limit
    end
  end
  
  read
  </code></pre>