title: how to proccess some tags in xml?
body: <p>I'm trying to read an xml and its nodes with simplexml, I can open and display it in the browser with print_r for example, but I dont get take the nodes I need , can someone help me?
  I need to get the value of the following tags, on tag <strong>Descritor</strong> I need everthing is inside it, then I´ve tag <strong>ContasCorrentes</strong> that is the main array, and inside it, I´ve many others tags on the same level, as <strong>DisponibilidadeFinanceira</strong>, <strong>DomicilioBancario</strong>, <strong>CredorFornecedor</strong> and etc...
  So I´ve already gotten some values from those tags but some tags has the following format →</p>
  <pre><code>&lt;gen:TipoDocumento&gt;TESTEB1&lt;/gen:TipoDocumento&gt;
  </code></pre>
  <p>So looks like that simplexml dont understant this part on that tag → <strong>gen:</strong> and on this way I dont get the data that I need :/</p>
  <p><strong>follows the <a href="https://mega.nz/file/J5IBGAzQ#G7GldcZ41yTLTl3VlKqEQw6MdwIpRrrA1m8ptnBEMV8" rel="nofollow noreferrer">LINK</a> of the example file</strong></p>
  <p>the other parts of the xml I´m taking like this for tests, probably isnt the best way to do it but this is what i got ↓</p>
  <pre><code>$xml = simplexml_load_file(&quot;C:\Users\Thiago\Downloads\xml-teste.xml&quot;);
  
  foreach ($xml-&gt;ContasCorrentes-&gt;DisponibilidadeFinanceira as $key) {
      $cont++;
      echo $key-&gt;ContaContabil . &quot; controle = &quot; . $cont . &quot;&lt;/br&gt;&quot;;    
  }
  
  $cont = 0;
  
  foreach ($xml-&gt;ContasCorrentes-&gt;DomicilioBancario as $key) {
      $cont++;
      echo $key-&gt;CodigoAplicacao . &quot; aplicacao cod = &quot; . $cont . &quot;&lt;/br&gt;&quot;;    
  }
  </code></pre>
  <p>So since then thanks for any help guys !</p>
  <p><strong>UPDATE 1</strong></p>
  <p>thanks guys, I solved my problem like this ↓</p>
  <pre><code>$xml = simplexml_load_file(&quot;C:\Users\Thiago\teste.xml&quot;);
  $campos = $xml-&gt;Descritor-&gt;children('gen', true);
  
  foreach($campos as $chave =&gt; $valor){    
      echo &quot;chave =&gt; {$chave} | valor =&gt; {$valor}&lt;br&gt;&quot;;
  }
  die;
  </code></pre>