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(): <?xml version="1.0" encoding="utf-8"?><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('<?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