title: Can't get SimpleXMLElement content
body: <p>Sorry, but I coulnd't find anything that solved my problem.</p>
  
  <p>I'm using PHP and I have the following xml as a string:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;
    &lt;soap:Body&gt;
      &lt;nfeResultMsg xmlns="http://www.portalfiscal.inf.br/nfe/wsdl/NFeInutilizacao4"&gt;
        &lt;retInutNFe versao="4.00" xmlns="http://www.portalfiscal.inf.br/nfe"&gt;
          &lt;infInut&gt;
            &lt;tpAmb&gt;2&lt;/tpAmb&gt;
            &lt;verAplic&gt;AJXNZiasn&lt;/verAplic&gt;
            &lt;cStat&gt;102&lt;/cStat&gt;
            &lt;xMotivo&gt;Inutilizacao de numero homologado&lt;/xMotivo&gt;
            &lt;cUF&gt;20&lt;/cUF&gt;
            &lt;ano&gt;20&lt;/ano&gt;
            &lt;CNPJ&gt;169&lt;/CNPJ&gt;
            &lt;mod&gt;65&lt;/mod&gt;
            &lt;serie&gt;123&lt;/serie&gt;
            &lt;nNFIni&gt;140&lt;/nNFIni&gt;
            &lt;nNFFin&gt;140&lt;/nNFFin&gt;
            &lt;dhRecbto&gt;2020-04-20T15:27:49-03:00&lt;/dhRecbto&gt;
            &lt;nProt&gt;9019848505847&lt;/nProt&gt;
          &lt;/infInut&gt;
        &lt;/retInutNFe&gt;
      &lt;/nfeResultMsg&gt;
    &lt;/soap:Body&gt;
  &lt;/soap:Envelope&gt;
  </code></pre>
  
  <p>And I'm using the <code>SimpleXMLElement</code> as follows:</p>
  
  <pre><code>function xmlAdapter(string $xml) {
      $xmlElement = new \SimpleXMLElement($xml);
      $document = [
        'xmlElement'    =&gt; $xmlElement,
        'xml'           =&gt; $xml
      ];
  
      return $document; }
  </code></pre>
  
  <p>But <code>document-&gt;xmlElement</code> returns <code>{}</code>.</p>
  
  <p>What I want is to grab everything that is inside <code>nfeResultMsg</code> tag, but I couldn't find a way to access it. I wanna save a new xml document just with the content from <code>nfeResultMsg</code>.</p>
  
  <p>Does anybody knows how I could do something like it? Thx a lot.</p>