XML + PHP is going to eat my shorts

From: Date: Tue, 16 Nov 2004 14:13:28 +0000
Subject: XML + PHP is going to eat my shorts
Groups: php.general 
Request: Send a blank email to php-general+get-202142@lists.php.net to get a copy of this message
Okie dokie....I have to parse an XML file and I continue to RTFM, STFW, and STFA. So I do this... /* let's parse! */ if($readXML = fopen(XMLDIR."testRecp.xml", "r")){ while($lineXML = fread($readXML, 4096)){ xml_parse($covadParser, $lineXML, feof($readXML)); $darn = xml_error_string(xml_get_error_code($covadParser)); echo "XML Error " . $darn . "<br />\n"; } } else { echo "COULD NOT READ XML FILE\n"; } And when the pareser hits the first line of the XML file ... <?xml version="1.0" encoding="ISO-8859-1"?> ... it throws an error from xml_get_error_code "syntax error" I have done ini_set("short_open_tag", 0); All of my functions and directives are in place for the xml parser. I have beaten my forehead against the wall. I have searched and googled and read and screamed. Can anyone help me get over this extremely frustrating hump?

« previous php.general (#202142) next »