66 $this->success =
true;
68 $this->props = array();
74 $f_in = fopen(
$path,
"r");
76 $this->success =
false;
80 $xml_parser = xml_parser_create_ns(
"UTF-8",
" ");
82 xml_set_element_handler($xml_parser, array(&$this,
88 xml_parser_set_option($xml_parser, XML_OPTION_CASE_FOLDING,
false);
90 while ($this->success && !feof($f_in)) {
92 if (is_string($line)) {
94 $this->success&= xml_parse($xml_parser, $line,
false);
99 $this->success&= xml_parse($xml_parser,
"",
true);
102 xml_parser_free($xml_parser);
106 if (!count($this->props)) $this->props =
"all";
120 if (strstr($name,
" ")) {
121 list($ns, $tag) = explode(
" ", $name);
122 if ($ns ==
"") $this->success =
false;
128 if ($this->depth == 1) {
129 if ($tag ==
"allprop") $this->props =
"all";
131 if ($tag ==
"propname") $this->props =
"names";
134 if ($this->depth == 2) {
138 if ($ns) $prop[
"xmlns"] = $ns;
139 $this->props[] = $prop;
_endElement($parser, $name)
_startElement($parser, $name, $attrs)