Why is this failing....?
If I comment out the xml_set_element_handler() call, it's okay...
If I comment out the xml_parse() call, it's okay...
If I leave both of them in...it core dumps.
Ideas?
-Szii
<?php
function startElement($parser, $name, $attrs)
{
}
function endElement($parser, $name)
{
}
$data = "<?xml version=\"1.0\"?><xml></xml>";
$xmlp = xml_parser_create();
xml_set_element_handler($xmlp, "startElement", "endElement");
if (!xml_parse($xmlp, $data, 1))
{
die(sprintf("XML error: %s at line %d",
xml_error_string(xml_get_error_code($xmlp)),
xml_get_current_line_number($xmlp)));
}
xml_parser_free($xmlp);
?>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]