I have the following problem, when reading an xml of an invoice I am presented with a Warning with a specific invoice format. This is not happening to me with another group of invoices that I can process. Then I leave the Warning that is generating me.
Warning:
Warning: SimpleXMLElement :: __ construct (): tmp / CAMF840207IB3-20180108T181935.xml: 20: namespace error: xmlns: schemaLocation: ' link link ' is not a valid URI in /opt/lampp/htdocs/cajachica/models/archivo_model.php on line 75
Line 75 code
$xml = new SimpleXMLElement($path."/".$archivo,null,TRUE);
The line where the error is being generated is the following:
<cfdi:Complemento>
<registrofiscal:CFDIRegistroFiscal xmlns:schemaLocation="http://www.sat.gob.mx/registrofiscal http://www.sat.gob.mx/sitio_internet/cfd/cfdiregistrofiscal/cfdiregistrofiscal.xsd" Version="1.0" Folio="XXXXXXXXXXXX" xmlns:registrofiscal="http://www.sat.gob.mx/registrofiscal"></registrofiscal:CFDIRegistroFiscal>
The section of the code where I am registering the namespace :
$xml->registerXPathNamespace('reg',$namespaces['registrofiscal']);