XML Parser doesn't work when moved....

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Below is the code that work on a PHP 4.2.1 test server. For some reason
it is not working and not throwing errors(set to E_ALL) on 4.3.7 server.
Has anyone experienced this kind of error? Or can someone point me in
the right direction? TVMIA!

/* create a parser */
if(!($covadParser = xml_parser_create())){
	echo "Failed to create parser<br>\n";
	exit();
}
/* set handlers for parser */
xml_set_element_handler($covadParser, "StartTag", "EndTag");
xml_set_character_data_handler($covadParser, "DataHandler");
/* let's parse! */
if($readXML = fopen(XMLDIR."testRecp.xml", "r")){
	while($lineXML = fread($readXML, 4096)){
		//echo $lineXML . "<br>\n";
		xml_parse($covadParser, $lineXML, feof($readXML));
	}
} else {
	echo "COULD NOT READ XML FILE\n";
}
/* clear the parser */
xml_parser_free($covadParser);

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux