title: XPATH: exclude elements which which has a specific child
body: <pre><code>&lt;ul&gt;
    &lt;li&gt;&lt;a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a&gt;&lt;/li&gt;
    &lt;li&gt;
      &lt;div&gt;
        &lt;a&gt;
      &lt;/div&gt;
    &lt;/li&gt;
  &lt;/ul&gt;
  </code></pre>
  
  <p>How can I select only first 2 li items and exclude <strong>li</strong> that contains div inside?</p>
  
  <p>Considering <strong>ul</strong> is set as parent, I've tried </p>
  
  <pre><code>./li[not(contains(descendant::div]
  </code></pre>
  
  <p>But obviously that didn't work</p>