I'm reading an XML file with the command simplexml_load_file()
which has the following structure:
<nfeProc xmlns="http://www.portalfiscal.inf.br/nfe" versao="2.00">
<NFe></NFe>
</nfeProc>
How do I get the value of the versao
attribute?
I tried the following code but it did not work
$xmlsimple=simplexml_load_file($_FILES['filexml']['tmp_name']);
echo $xmlsimple->nfeProc['versao'];