title: Selecting an element by class in JSoup
body: <p>I have the following HTML, I want to be able to extract the name and number of cars from the fragment using JSoup</p>
  
  <pre><code>&lt;div class="user-info clearfix"&gt;
      &lt;div class="user-review-name clearfix"&gt;
          &lt;a class="user-review-name-link" rel="nofollow" title="go to tom&amp;#39;s profile"&gt;
              tom
          &lt;/a&gt;
      &lt;/div&gt;
      &lt;div class="clearfix"&gt;
          2 cars
      &lt;/div&gt; 
  </code></pre>
  
  <p></p>
  
  <p>I can get the name ok, but I just can't get what is in the clearfix class. This is my code.</p>
  
  <pre><code>        Elements reviews = doc.select("div.review");
          for (Element review : reviews) {
              Elements subreviews = review.select("div.user-info");
              for (Element subreview : subreviews) {
                  System.out.println(subreview.select("a.user-review-name-link").text());
                  System.out.println(subreview.select("div:not(.user-review-name-link)").text());
              }
          }
  </code></pre>
  
  <p>I have tried different combinations, but for some reason I can never get <strong>2 cars</strong> by itself. Help?</p>
  
  <pre><code>System.out.println(subreview.select("div.clearfix").text());
  </code></pre>
  
  <p>I would have thought this would work too, but it produces this format "tom 2 cars tom 2 cars"</p>