title: XML Xpath Failing on getElementsByTagName
body: <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;AddProduct&gt;
  &lt;auth&gt;&lt;id&gt;vendor123&lt;/id&gt;&lt;auth_code&gt;abc123&lt;/auth_code&gt;&lt;/auth&gt;
  &lt;/AddProduct&gt;
  </code></pre>
  
  <p>What am I doing wrong to get : Fatal error: Call to undefined method DOMNodeList::getElementsByTagName() </p>
  
  <pre><code>$xml = $_GET['xmlRequest'];
  $dom = new DOMDocument();
  @$dom-&gt;loadXML($xml);
  
  $xpath = new DOMXPath($dom);
  
  $auth = $xpath-&gt;query('*/auth');
  $id = $auth-&gt;getElementsByTagName('id')-&gt;item(0)-&gt;nodeValue;
  $code = $auth-&gt;getElementsByTagName('auth_code')-&gt;item(0)-&gt;nodeValue;
  </code></pre>