title: PHP xpath query with namespaces returns broken nodes
body: <p>I try to parse wfs xml structures with PHP 8.1 and have the following snippet:</p>
  <pre><code>&lt;?php
  
  $rawContent = file_get_contents('https://www.geobasisdaten.niedersachsen.de/doorman/noauth/WFS_NI_2211_ATKIS_BDLM-Modell-konform?request=getCapabilities&amp;service=wfs&amp;version=1.1.0');
  // source: https://numis.niedersachsen.de/trefferanzeige?docuuid=e26aebd6-cc4c-4af2-8be3-8719b808df5d&amp;plugid=/ingrid-group:iplug-csw-dsc-lgln&amp;docid=julvu30Bh4CjFjsS0QgC
  
  // the following works fine:
  // $rawContent = file_get_contents('https://pegelonline.wsv.de/webservices/gis/aktuell/wfs?request=GetCapabilities&amp;service=WFS&amp;typename=gk%3Awaterlevels&amp;version=1.1.0');
  // source: https://pegelonline.wsv.de
  
  $wfsStructure= new \SimpleXMLElement($rawContent);
  
  $wfsStructure-&gt;registerXPathNamespace('wfs', 'http://www.opengis.net/wfs');
  $wfsStructure-&gt;registerXPathNamespace('ows', 'http://www.opengis.net/ows/1.1');
  $wfsStructure-&gt;registerXPathNamespace('ogc', 'http://www.opengis.net/ogc');
  
  $resultList = $wfsStructure-&gt;xpath('//*[local-name()=\'FeatureType\']');
  // same result with following xpath
  // $resultList = $wfsStructure-&gt;xpath('/wfs:WFS_Capabilities/wfs:FeatureTypeList//wfs:FeatureType');
  
  var_dump($resultList);
  </code></pre>
  <p>The result is kind of boring:</p>
  <pre><code>array(105) {
    [0]=&gt;
    object(SimpleXMLElement)#2 (0) {
    }
    [1]=&gt;
    object(SimpleXMLElement)#3 (0) {
    }
    [2]=&gt;
    object(SimpleXMLElement)#4 (0) {
    }
    (…)
    [103]=&gt;
    object(SimpleXMLElement)#105 (0) {
    }
    [104]=&gt;
    object(SimpleXMLElement)#106 (0) {
    }
  }
  </code></pre>
  <p>So my script detects 104 nodes, but all of them are empty. Do you have any clues why I’m stepping in trouble there? When I call the other wfs source commented in the script above, everything works fine.</p>