title: How to extract elements from html page using HtmlUnit
body: <p>I have two questions(problems actually) while parsing the html page using <code>HtmlUnit</code>.I tried their 'Getting Started` as well as searched google but no help.Here is my first problem.</p>
  
  <p>1) I want to extract the text of following <code>bold</code> tag from the page</p>
  
  <pre><code>&lt;b class="productPrice"&gt;Five Dollars&lt;/b&gt;
  </code></pre>
  
  <p>2)I want to extract the entire text(including further span or link text,if present) in the last paragraph in the following structure</p>
  
  <pre><code>&lt;div class="alertContainer"&gt;
  &lt;p&gt;Hello&lt;/p&gt;
  &lt;p&gt;Haven't you registeret yet?&lt;/p&gt;
  &lt;p&gt;Registrations will close on 3 July 2012.&lt;span&gt;So don't wait&lt;/span&gt;&lt;/p&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Can you please one-line code snippets how can I do that?I am new to HtmlUnit.</p>
  
  <p><strong>EDIT:</strong></p>
  
  <p>HtmlUnit has <code>getElementByName()</code> and <code>getElementById()</code>, so what do we use if we want to select using class?</p>
  
  <p>This will be the answer to my first question.</p>