65 $this->success =
true;
68 $this->props = array();
77 $f_in = fopen(
$path,
"r");
79 $this->success =
false;
84 $xml_parser = xml_parser_create_ns(
"UTF-8",
" ");
87 xml_set_element_handler($xml_parser,
88 array(&$this,
"_startElement"),
89 array(&$this,
"_endElement"));
92 xml_parser_set_option($xml_parser,
93 XML_OPTION_CASE_FOLDING,
false);
97 while($this->success && !feof($f_in)) {
99 if (is_string($line)) {
101 $this->success &= xml_parse($xml_parser, $line,
false);
107 $this->success &= xml_parse($xml_parser,
"",
true);
111 xml_parser_free($xml_parser);
117 if(!count($this->props)) $this->props =
"all";
132 if (strstr(
$name,
" ")) {
133 list($ns, $tag) = explode(
" ",
$name);
135 $this->success =
false;
142 if ($this->depth == 1) {
143 if ($tag ==
"allprop")
144 $this->props =
"all";
146 if ($tag ==
"propname")
147 $this->props =
"names";
151 if ($this->depth == 2) {
152 $prop = array(
"name" => $tag);
154 $prop[
"xmlns"] = $ns;
155 $this->props[] = $prop;