81 $this->success =
true;
87 $f_in = fopen(
$path,
"r");
89 $this->success =
false;
94 $xml_parser = xml_parser_create_ns(
"UTF-8",
" ");
97 xml_set_element_handler(
99 array(&$this,
"_startElement"),
100 array(&$this,
"_endElement")
102 xml_set_character_data_handler(
104 array(&$this,
"_data")
108 xml_parser_set_option(
110 XML_OPTION_CASE_FOLDING,
115 while ($this->success && !feof($f_in)) {
116 $line = fgets($f_in);
117 if (is_string($line)) {
119 $this->success &= xml_parse($xml_parser, $line,
false);
125 $this->success &= xml_parse($xml_parser,
"",
true);
129 $this->success &= !empty($this->locktype);
130 $this->success &= !empty($this->lockscope);
133 xml_parser_free($xml_parser);
152 if (strstr(
$name,
" ")) {
160 if ($this->collect_owner) {
168 $ns_attr =
" xmlns='$ns'";
171 $this->owner .=
"<$ns_short$tag$ns_attr>";
172 } elseif ($ns ==
"DAV:") {
176 $this->locktype =
$tag;
180 $this->lockscope =
$tag;
183 $this->collect_owner =
true;
200 if ($this->collect_owner) {
201 $this->owner .=
$data;
216 if (strstr(
$name,
" ")) {
224 if (($ns ==
"DAV:") && (
$tag ==
"owner")) {
225 $this->collect_owner =
false;
229 if ($this->collect_owner) {
236 $ns_attr =
" xmlns='$ns'";
239 $this->owner .=
"</$ns_short$tag$ns_attr>";
_startElement($parser, $name, $attrs)
tag start handler
_data($parser, $data)
data handler
__construct($path)
constructor
_endElement($parser, $name)
tag end handler
Create styles array
The data for the language used.
if(function_exists('posix_getuid') &&posix_getuid()===0) if(!array_key_exists('t', $options)) $tag