View Full Version : xml_parse $data chunk size

03-22-2007, 07:12 PM
Is there any restrictions on the size of $data passed to xml_parse()? All the tutorials I see parse an XML file by making repeated calls with the next 4096 bytes each time. Is this just convention, or is there a reason for it?

I'd much rather just dump the entire file in one call to xml_parse using file_get_contents. Much simpler.

03-22-2007, 07:27 PM
http://www.php.net/function.xml_parse doesnt say there is a limit to hw much u can parse

03-26-2007, 03:30 PM
Which is why I asked here. It seems pretty arbritrary to use 4096, but I presumed there was a reason.