ok = xml_parse_into_struct($p, $data, $this->vals, $this->index); if ($this->ok != 1) { \Logging\LogError("XMLParse error. data:" . $data); } xml_parser_free($p); } public function IsSuccess() { return $this->ok == 1; } public function GetValue($key) { return $this->vals[$this->index[$key][0]]["value"]; } public function GetValues() { $kv = array(); foreach ($this->vals as $value) { if (array_key_exists('value', $value)) { $kv[$value['tag']] = $value['value']; } } return $kv; } }