33 function init($xml_string, $namespace_map)
35 if (!$this->
setXML($xml_string)) {
39 foreach ($namespace_map as $prefix => $uri) {
142 $this->errors = array();
147 $this->xml = $xml_string;
155 $this->xpath = $this->doc->xpath_new_context();
168 $result = @$this->xpath->xpath_eval($xpath, $node);
170 $result = @$this->xpath->xpath_eval($xpath);
189 return $node->get_content();
196 $arr = $node->attributes();
200 foreach ($arr as $attrnode) {
201 $result[$attrnode->name] = $attrnode->value;
225 $this->errors = array();
230 $this->xml = $xml_string;
231 $this->doc =
new DOMDocument;
237 if (!@$this->doc->loadXML($xml_string)) {
241 $this->xpath =
new DOMXPath($this->doc);
252 return $this->xpath->registerNamespace($prefix, $uri);
258 $result = @$this->xpath->query($xpath, $node);
260 $result = @$this->xpath->query($xpath);
269 for ($i = 0; $i <
$result->length; $i++) {
279 return $node->textContent;
286 $arr = $node->attributes;
290 for ($i = 0; $i < $arr->length; $i++) {
291 $node = $arr->item($i);
292 $result[$node->nodeName] = $node->nodeValue;
316 $__Auth_Yadis_defaultParser = $parser;
321 return array(
'dom' =>
'Auth_Yadis_dom',
322 'domxml' =>
'Auth_Yadis_domxml');
335 if (isset($__Auth_Yadis_defaultParser)) {
341 if (extension_loaded($extension))
343 $p =
new $classname();