title: How do I get the next HTML element in Nokogiri?
body: <p>Let's say my HTML document is like:</p>
  
  <pre><code>&lt;div class="headline"&gt;News&lt;/div&gt;
  &lt;p&gt;Some interesting news here&lt;/p&gt;
  &lt;div class="headline"&gt;Sports&lt;/div&gt;
  &lt;p&gt;Baseball is fun!&lt;/p&gt;
  </code></pre>
  
  <p>I can get the <code>headline</code> divs with the following code:</p>
  
  <pre><code>require 'rubygems'
  require 'nokogiri'
  require 'open-uri'
  
  url = "mypage.html"
  doc = Nokogiri::HTML(open(url))
  
  doc.css(".headline").each do |item|  
    puts item.text
  end 
  </code></pre>
  
  <p>But how do I access the content in the following <code>p</code> tag so that <code>News</code> is related to <code>Some interesting news here</code>, etc?</p>