- $xmlRpcParser = new XMLParser();
- xml_set_object($parser, $xmlRpcParser);
-
- 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);
+ $xmlRpcParser = $this->getParser();
+ $xmlRpcParser->parse(
+ $xmlVal,
+ XMLParser::RETURN_XMLRPCVALS,
+ XMLParser::ACCEPT_REQUEST | XMLParser::ACCEPT_RESPONSE | XMLParser::ACCEPT_VALUE | XMLParser::ACCEPT_FAULT,
+ $parserOptions
+ );