Ver Mensaje Individual
  #9 (permalink)  
Antiguo 01/09/2014, 16:58
echo_
 
Fecha de Ingreso: noviembre-2011
Ubicación: Paris
Mensajes: 450
Antigüedad: 12 años, 5 meses
Puntos: 7
Respuesta: Problema al abrir un archivo XML

Gracias, ahora trato de imprimir todos los registros pero me tira este error:
Código PHP:
                     $dbquery->execute();
           while(
$rows $dbquery->fetch(PDO::FETCH_ASSOC)){
                  
$string $rows['BYTES'];
                    
$tuxml = new SimpleXMLElement(htmlspecialchars($string));
             echo 
$tuxml->attributes()->Moneda;
                 
           
                                 

           } 

Error:
Código:
Warning: SimpleXMLElement::__construct(): Entity: line 1: parser error : Start tag expected, '<' not found in /var/www/client/lib/class/index.php on line 34

Warning: SimpleXMLElement::__construct(): &lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;&lt;cfdi:Comprob in /var/www/client/lib/class/index.php on line 34

Warning: SimpleXMLElement::__construct(): ^ in /var/www/client/lib/class/index.php on line 34

Fatal error: Uncaught exception 'Exception' with message 'String could not be parsed as XML' in /var/www/client/lib/class/index.php:34 Stack trace: #0 /var/www/client/lib/class/index.php(34): SimpleXMLElement->__construct('&lt;?xml versio...') #1 /var/www/client/lib/class/index.php(47): uuid->select() #2 {main} thrown in /var/www/client/lib/class/index.php on line 34