success = xml_parse($xml_parser, $response, true); xml_parser_free($xml_parser); } private function _startElement($parser, $name, $attrs) { if (strstr($name, " ")) { list($ns, $tag) = explode(" ", $name); } else { $ns = ""; $tag = $name; } if ($ns == "DAV:") { switch ($tag) { case "locktoken": $this->collect_locktoken = true; break; } } } private function _data($parser, $data) { if ($this->collect_locktoken) { $this->locktoken .= $data; } } private function _endElement($parser, $name) { if (strstr($name, " ")) { list($ns, $tag) = explode(" ", $name); } else { $ns = ""; $tag = $name; } switch ($tag) { case "locktoken": $this->collect_locktoken = false; $this->locktoken = trim($this->locktoken); break; } } } /* * Local variables: * tab-width: 4 * c-basic-offset: 4 * indent-tabs-mode:nil * End: */