undefined method `next_element' for #<Nokogiri::XML::DTD:0x....>
<p>I want to get the next element text by previous I'm doing like this </p>

<pre><code>property_doc = Nokogiri::HTML(open(my_url))

address = property_doc.xpath('//section[@class="container"]/dl/dt[contains(text(), "Address")]').next_element.text
</code></pre>

<p>but <code>error</code> occurred  <code>undefined method 'next_element' for #&lt;Nokogiri::XML::DTD:0x....&gt;</code></p>

<p>I want to next element text which is showing at <code>html</code> :</p>

<pre><code>&lt;section class="container"&gt;
&lt;dl&gt;
&lt;dt&gt;Address&lt;/dt&gt;
&lt;dd class=""&gt;550 Seagaze Dr&lt;br&gt;Oceanside CA 92054 &lt;/dd&gt;
&lt;/dl&gt;
&lt;/section&gt;
</code></pre>