title: SimpleXML namespaced attributes and value is empty?
body: <p>I have the following type of XML structure:</p>
  
  <pre><code>&lt;catalog xmlns="http://www.namespace.com"&gt;
      &lt;product product-id="test-product"&gt;
          &lt;page-attributes&gt;
              &lt;page-title xml:lang="en"&gt;test&lt;/page-title&gt;
              &lt;page-title xml:lang="de"&gt;test2&lt;/page-title&gt;
          &lt;/page-attributes&gt;
      &lt;/product&gt;
  &lt;/catalog&gt;
  </code></pre>
  
  <p>I used the following to fetch the product and it's <code>page-title</code> elements:</p>
  
  <pre><code>$xml-&gt;registerXPathNamespace('ns', $xml-&gt;getNamespaces()[""]);
  $xpath = '//ns:product[@product-id="test-product"]';
  $product = $xml-&gt;xpath($xpath)[0];
  
  foreach ($product-&gt;{'page-attributes'}-&gt;{'page-title'} as $title) {
      var_dump($title);
      var_dump($title-&gt;{"@attributes"});
      var_dump($title-&gt;attributes());
  }
  </code></pre>
  
  <p>But I just get:</p>
  
  <pre><code>object(SimpleXMLElement)#4 (0) {
  }
  object(SimpleXMLElement)#6 (0) {
  }
  object(SimpleXMLElement)#6 (0) {
  }
  object(SimpleXMLElement)#6 (0) {
  }
  object(SimpleXMLElement)#4 (0) {
  }
  object(SimpleXMLElement)#4 (0) {
  }
  </code></pre>
  
  <p>How do I get the values of the <code>page-title</code> elements (<code>test</code>,<code>test2</code>)? Also how do I get the attributes? The attributes have <code>xml:</code> in front of them. Does that mean just the attributes are in their own namespace?</p>