title: PHP DOM: Get Nodevalue without descendant nodes
body: <p>i am using the php dom function <code>nodeValue</code> to extract the text of content. But it returns the descendant values too:</p>
  
  <pre><code>&lt;example&gt;
  &lt;inhalt&gt;123&lt;more&gt;45&lt;/more&gt;&lt;/inhalt&gt;
  &lt;/example&gt;
  </code></pre>
  
  <p>return for <code>inhalt</code> 12345 and 123 as i prefer. I know that is not the sense and not very well to have text inside <code>inhalt</code> but how i check that there is no text in <code>inhalt</code> like <code>hasNodeValue</code>?</p>