ID: 31821 Updated by: [EMAIL PROTECTED] Reported By: jsmestad at advantageline dot com -Status: Open +Status: Bogus Bug Type: XML related Operating System: Windows XP Professional SP2 PHP Version: 5CVS-2005-02-02 (dev) New Comment:
Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php you need to set is_final flag for the error to appear when using libxml rather than expat so that libxml knows that all the data has been passed to the parser: xml_parse($xml_parser,"<thdoc><this>this&that</this><that>thatdata</that></thdoc>", TRUE); Previous Comments: ------------------------------------------------------------------------ [2005-02-02 22:20:59] jsmestad at advantageline dot com Description: ------------ The XML parser does not return an error when expected. Reproduce code: --------------- $xml_parser = xml_parser_create(); xml_set_element_handler($xml_parser, "startTag", "endTag"); xml_set_character_data_handler($xml_parser, "cdata"); $data = xml_parse($xml_parser,"<thdoc><this>this&that</this><that>thatdata</that></thdoc>"); printf("%s at line %d", xml_error_string(xml_get_error_code($xml_parser)), xml_get_current_line_number($xml_parser)); Expected result: ---------------- not well-formed (invalid token) at line 1 Actual result: -------------- No error at line 1 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=31821&edit=1
