title: HtmlAgilityPack select "p" nodes that don't have child "p"
body: <p>How can I efficiently select all nodes of type <code>x</code> that are not children of a node of type <code>x</code>?</p>
  
  <p>Example with type as <code>p</code>:</p>
  
  <pre><code>&lt;p id="top1"&gt;
      &lt;ul&gt;
          &lt;li&gt;Text&lt;/li&gt;
          &lt;li&gt;Text&lt;/li&gt;
          &lt;li&gt;Text&lt;/li&gt;
      &lt;/ul&gt;
      &lt;div&gt;
          &lt;p id="sub"&gt;
              &lt;p id="sub_sub"&gt;
              &lt;/p&gt;
          &lt;/p&gt;
      &lt;/div&gt;
  &lt;/p&gt;
  &lt;div&gt;
      &lt;div&gt;
          &lt;p id="top2"&gt;
          &lt;/p&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>The select should only return nodes with ids <code>top1</code> and <code>top2</code></p>