title: xpath: selecting all siblings without given element?
body: <pre><code>&lt;html&gt; 
  &lt;body&gt; 
  &lt;div id="products"&gt; 
  &lt;h1&gt;text1&lt;/h1&gt; &lt;b&gt; description1 &lt;/b&gt; &lt;i&gt;foo&lt;/i&gt;
  &lt;h1&gt;text2&lt;/h1&gt; &lt;b&gt; description2 &lt;/b&gt; 
  &lt;h1&gt;text3&lt;/h1&gt; 
  &lt;h1&gt;text4&lt;/h1&gt; &lt;b&gt; description4 &lt;/b&gt; 
  &lt;/div&gt; 
  &lt;/body&gt; 
  &lt;/html&gt;
  </code></pre>
  
  <p><code>//h1[not(following-sibling::*[1][self::b])]</code> selects the <code>text3</code> heading. </p>
  
  <p><code>&lt;i&gt;foo&lt;/i&gt;</code> can be in any position ! It may not always be in the position described above.</p>
  
  <p>I want to select the <code>h1</code> element which doesn't have <code>foo</code>, so I should get</p>
  
  <pre><code>text2,text3,text4
  </code></pre>