title: Extracting consecutive html fragments with enlive
body: <p>I need to scrape html that has the following form:</p>
  
  <pre><code>&lt;div id='content'&gt;
      &lt;h3&gt;Headline1&lt;/h3&gt;
      &lt;div&gt;Text1&lt;/div&gt;
      &lt;div&gt;Text2&lt;/div&gt;
      &lt;div&gt;Text3&lt;/div&gt;
      &lt;h3&gt;Headline2&lt;/h3&gt;
      &lt;div&gt;Text4&lt;/div&gt;
      &lt;div&gt;Text5&lt;/div&gt;
      &lt;h3&gt;Headline3&lt;/h3&gt;
      &lt;div&gt;Text6&lt;/div&gt;
      &lt;div&gt;... and so on ...&lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>I need to get the content between the  headline tags as separate chunks. So from one headline up to the next. Unfortunately there is no container tag for the desired ranges.</p>
  
  <p>I tried the fragment selector <code>{[:h3] [:h3]}</code> but somehow this only returns all h3 tags, without the tags in between them:
      <code>(({:tag :h3, :attrs nil, :content ("Headline1")}) ({:tag :h3, :attrs nil, :content ("Headline2")}) ({:tag :h3, :attrs nil, :content ("Headline3")}))</code></p>
  
  <p>What does work, is <code>{[[:h3 (html/nth-of-type 1)]] [[:h3 (html/nth-of-type 2)]]}</code>. This gives me all of the html between the first and second h3-tag. However this does not give me all of the desired chunks with one selector.</p>
  
  <p>Can enlive do this at all or should I resort to a regular expression?</p>
  
  <p>Thanks!</p>