- $xmlRpcParser = new XMLParser();
- xml_set_object($parser, $xmlRpcParser);
-
- if ($this->functions_parameters_type != 'xmlrpcvals') {
- xml_set_element_handler($parser, 'xmlrpc_se', 'xmlrpc_ee_fast');
- } else {
- xml_set_element_handler($parser, 'xmlrpc_se', 'xmlrpc_ee');
- }
- xml_set_character_data_handler($parser, 'xmlrpc_cd');
- xml_set_default_handler($parser, 'xmlrpc_dh');
- if (!xml_parse($parser, $data, 1)) {
- // return XML error as a faultCode
+ $xmlRpcParser = new XMLParser($options);
+ $xmlRpcParser->parse($data, $this->functions_parameters_type, XMLParser::ACCEPT_REQUEST);
+ if ($xmlRpcParser->_xh['isf'] > 2) {
+ // (BC) we return XML error as a faultCode
+ preg_match('/^XML error ([0-9]+)/', $xmlRpcParser->_xh['isf_reason'], $matches);