function xmlrpc_message_tag_open in xmlrpc 8
Handles opening tags for XML parsing in xmlrpc_message_parse().
Parameters
resource $parser: A resource handle for the XML parser.
string $tag: A XML element name.
array $attribs: Required by xml_set_element_handler() signature, but not used.
See also
1 string reference to 'xmlrpc_message_tag_open'
- xmlrpc_message_parse in ./
xmlrpc.inc - Parses an XML-RPC message.
File
- ./
xmlrpc.inc, line 247 - Drupal XML-RPC library.
Code
function xmlrpc_message_tag_open($parser, $tag, array $attribs) {
$xmlrpc_message = xmlrpc_message_get();
$xmlrpc_message->current_tag_contents = '';
$xmlrpc_message->last_open = $tag;
switch ($tag) {
case 'methodCall':
case 'methodResponse':
case 'fault':
$xmlrpc_message->messagetype = $tag;
break;
// Deal with stacks of arrays and structs.
case 'data':
$xmlrpc_message->array_structs_types[] = 'array';
$xmlrpc_message->array_structs[] = [];
break;
case 'struct':
$xmlrpc_message->array_structs_types[] = 'struct';
$xmlrpc_message->array_structs[] = [];
break;
}
xmlrpc_message_set($xmlrpc_message);
}