- xml_set_element_handler($parser, 'xmlrpc_se_any', 'xmlrpc_ee');
- xml_set_character_data_handler($parser, 'xmlrpc_cd');
- xml_set_default_handler($parser, 'xmlrpc_dh');
- if (!xml_parse($parser, $xmlVal, 1)) {
- $errstr = sprintf('XML error: %s at line %d, column %d',
- xml_error_string(xml_get_error_code($parser)),
- xml_get_current_line_number($parser), xml_get_current_column_number($parser));
- error_log($errstr);
- xml_parser_free($parser);
-
- return false;
- }
- xml_parser_free($parser);