title: XPath - Select Elements Not Containing Elements
body: <p>I cant seem to find topic which answers this so I'm asking myself.<br>
  Since this is generic question for which answer can be applied to most documents, I think specific code example is not necessary.</p>
  
  <p>Using XPath I want to select all table nodes which do not nest other tables.<br>
  So no other descendant table elements, and I also want to discard all tables which have spaces only as their value.</p>
  
  <p>I have tried this:</p>
  
  <pre><code>//table[not(child::table) and normalize-space(.)]
  </code></pre>
  
  <p>but it's not working.</p>
  
  <p>What is the right way to do it?</p>