title: Extract data between two divs using xpath
body: <pre><code>    &lt;div id="content"&gt;
          &lt;div class="sample1"&gt;sample text1&lt;/div&gt;
          &lt;div class="sample2"&gt;
             &lt;span style="float:right"&gt;some text2&lt;/span&gt;
             &lt;b&gt;some text2&lt;/b&gt;
          &lt;/div&gt;
          &lt;div class="sample3"&gt; sample text &lt;a href="#"&gt;This page&lt;/a&gt; 3&lt;/div&gt;
          &lt;p&gt;paragraph 1&lt;/p&gt;
          &lt;p&gt;paragraph 2&lt;/p&gt; 
          &lt;div class="sample4"&gt;sample text4&lt;/div&gt;
     &lt;/div&gt;
  </code></pre>
  
  <p>I want to extract data that is between these classes "sample2" and "sample4".<br />
  The out put will show lik this<br />
  sample text 3<br />
  paragraph 1<br />
  paragraph 2<br /></p>
  
  <p>How come?</p>