0
I have an XML that has a parent node Produtos
and 2500 knots children produto
, Every child us has a key id
that starts at 1 and goes up to 2500. When I try to load the XML
using the function simplexml_load_string
only 2237 child nodes are "parsed", is there any limit to this function? if yes how can I increase? below follows code used;
$call = curl_init();
$options = [
CURLOPT_URL => $import->xml_path,
CURLOPT_RETURNTRANSFER => 1,
CURLOPT_SSL_VERIFYPEER => false,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_CONNECTTIMEOUT => 20,
CURLOPT_RETURNTRANSFER => 1,
CURLOPT_SSL_VERIFYHOST => 0,
];
$xml = simplexml_load_string($xmlString, null, LIBXML_NOCDATA);
// => $xml é uma classe SimpleXMLElement com um attributo `produto` (array) com 2238 indices.
At the end of this loaded xml, it closes the Products node or stays open ? try increasing the memory limit ini_set('memory_limit', '512M');
– AnthraxisBR
I’ve tried it and it hasn’t changed a bit @Anthraxisbr
– RFL