XML + PHP is going to eat my shorts

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

 



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?

-- 
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