title: php Xpath return: non-object
body: <p>With PHP XPath i searching custumers in xml file:</p>
  
  <pre><code>$this-&gt;xpath-&gt;query(/custumer/new[id="222"])-&gt;item(0)-&gt;nodeValue;
  </code></pre>
  
  <p>But if this customer don't exist in xml file, i get error:</p>
  
  <pre><code>Notice: Trying to get property of non-object in D:\www\test.php on line 17
  </code></pre>
  
  <p>how to avoid this error?</p>