title: How to get the raw HTML of a node
body: <p>I am using Nokogiri to analyze some HTML, but, I don't know how get the raw HTML inside a node. </p>
  
  <p>For example, given:</p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;tr class="tableX"&gt;
    &lt;td align="center"&gt;
      &lt;font size="2"&gt;&lt;a href="javascript:open('9746')"&gt;9746&lt;/a&gt;&lt;/font&gt;
    &lt;/td&gt;
    &lt;td align="center"&gt;
      &lt;font size="2"&gt;2012-06-26&lt;/font&gt;
    &lt;/td&gt;
  &lt;/tr&gt;
  </code></pre>
  
  <p>When I use this XPath selector:</p>
  
  <pre class="lang-ruby prettyprint-override"><code>doc = Nokogiri::HTML(html)
  
  nodes = doc.search("//tr[@class='tablebX']")
  
  nodes.each do |node|
     node.text # or node.content
  end
  </code></pre>
  
  <p>The results from <code>node.text</code> and <code>node.content</code> are:</p>
  
  <pre class="lang-none prettyprint-override"><code>9746
  2012-06-26
  </code></pre>
  
  <p>I want to get all raw HTML inside the <code>tr</code> block, which, in this case, is:</p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;td align="center"&gt;
    &lt;font size="2"&gt;&lt;a href="javascript:open('9746')"&gt;9746&lt;/a&gt;&lt;/font&gt;
  &lt;/td&gt;
  &lt;td align="center"&gt;
    &lt;font size="2"&gt;2012-06-26&lt;/font&gt;
  &lt;/td&gt;
  </code></pre>
  
  <p>What's the proper way to do that?</p>