Re: XML HELP

From: Date: Tue, 09 Apr 2002 00:32:17 +0000
Subject: Re: XML HELP
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-92150@lists.php.net to get a copy of this message
On Mon, Apr 08, 2002 at 06:32:42PM -0400, Christopher J. Crane wrote: > $file = > > "http://quotes.nasdaq.com/quote.dll?page=xml&mode=stock&symbol=$sym"; ... snip ... > while ($data = fread($fp, 4096)) { > if (!xml_parse($xml_parser, $data, feof($fp))) { ... snip ... You've got a whole series of unneded steps and functions. More importantly, you're sending the file to the parser line by line. You need to send the whole file to the parser in one shot. $Contents = implode( '', file($file) ); if ( xml_parse($xml_parser, $Contents) ) { # Life is good! } Enjoy, --Dan -- PHP scripts that make web design easier SQL Solution | Layout Solution | Form Solution sqlsolution.info | layoutsolution.info | formsolution.info T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y 4015 7 Ave, Brooklyn NY 11232 v: 718-854-0335 f: 718-854-0409

« previous php.general (#92150) next »