Hello, I'm trying to display the results of an XML file but it returns me only the first records, from the second record I have no more results. What could be wrong?
Being inside a foreach
should show all records, but only the first ones appear.
I tried to transform the file as a string but the result was the same,
simplexml_load_string($texto)
only the first records were displayed.
$xml = simplexml_load_file("arquivo.xml");
foreach ($xml->PEDIDOS as $PEDIDOS ) {
echo $PEDIDOS->PEDIDO->PRODUTOS->PRODUTO->PRODUTO_COD."<br /><br />";
echo $PEDIDOS->PEDIDO->PRODUTOS->PRODUTO->PRODUTO_COD_FORNECEDOR."<br /><br />";
}