2
I am 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 attribute versao
?
I tried the following code but it didn’t work
$xmlsimple=simplexml_load_file($_FILES['filexml']['tmp_name']);
echo $xmlsimple->nfeProc['versao'];
Related: http://answall.com/questions/66437/transform-xml-containednuma-string-em-json
– Wallace Maxters