function parse_xml_array($xml_array)
 {
     $this->verdtd = isset($xml_array['VERDTD'][0][SYNCML_XML_DATA]) ? $xml_array['VERDTD'][0][SYNCML_XML_DATA] : '';
     $this->verproto = isset($xml_array['VERPROTO'][0][SYNCML_XML_DATA]) ? $xml_array['VERPROTO'][0][SYNCML_XML_DATA] : '';
     $this->sessionid = isset($xml_array['SESSIONID'][0][SYNCML_XML_DATA]) ? $xml_array['SESSIONID'][0][SYNCML_XML_DATA] : '';
     $this->verproto = isset($xml_array['VERPROTO'][0][SYNCML_XML_DATA]) ? $xml_array['VERPROTO'][0][SYNCML_XML_DATA] : '';
     $this->msgid = isset($xml_array['MSGID'][0][SYNCML_XML_DATA]) ? $xml_array['MSGID'][0][SYNCML_XML_DATA] : '';
     if (isset($xml_array['RESPURI'][0][SYNCML_XML_DATA])) {
         $this->respuri = $xml_array['RESPURI'][0][SYNCML_XML_DATA];
     }
     parent::parse_xml_array($xml_array);
     if (!isset($this->source['locuri'])) {
         $this->source['locuri'] = '';
     }
     if (!isset($this->target['locuri'])) {
         $this->target['locuri'] = '';
     }
 }
 /**
  * Build and save command objects from XML array.
  *
  * @param $body XML array of BODY element.
  */
 function process_body($body)
 {
     if (isset($body['FINAL'][0])) {
         $this->commands[] = new syncml_command_final();
     }
     if (isset($body['STATUS']) && is_array($body['STATUS'])) {
         for ($i = 0; array_key_exists($i, $body['STATUS']); $i++) {
             $this->commands[] = new syncml_command_status($body['STATUS'][$i]);
         }
     }
     if (isset($body[SYNCML_XML_ORIGINAL_ORDER]) && is_array($body[SYNCML_XML_ORIGINAL_ORDER])) {
         foreach ($body[SYNCML_XML_ORIGINAL_ORDER] as $command) {
             $command_obj = syncml_command::build($command);
             if ($command_obj) {
                 $this->commands[] = $command_obj;
             }
         }
     }
 }