XML methods(SAX/expat)

From: Date: Mon, 05 Feb 2001 17:58:50 +0000
Subject: XML methods(SAX/expat)
Groups: php.general 
Request: Send a blank email to php-general+get-38284@lists.php.net to get a copy of this message
When parsing a CDATA field that's being read in from a file, if the fread() buffer fills up, does it make two calls to the CDATA or does it wait for the closing tag to show up before firing off to the handler? while ($data = fread($fp,1)) // yes, I know you shouldn't use '1', but it's an example { xml_parse($parser, $data,feof($fp)); } ie, should I set a flag if the CDATA's base64 encoded to persist over multiple CDATA events, or does it wait for the closing tag and send all of the data off to the handler as one batch? Some CDATA elements may be multiple megabyte images. (Yes, it's from an outside source that we have no control of.) -Szii

« previous php.general (#38284) next »