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;
148 $this->doc = @domxml_open_mem($xml_string, DOMXML_LOAD_PARSING,
155 $this->xpath = $this->doc->xpath_new_context();
162 return xpath_register_ns($this->xpath, $prefix, $uri);
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;
238 if (function_exists(
'libxml_disable_entity_loader') && function_exists(
'libxml_use_internal_errors')) {
240 $loader = libxml_disable_entity_loader(
true);
241 $errors = libxml_use_internal_errors(
true);
242 $parse_result = @$this->doc->loadXML($xml_string);
243 libxml_disable_entity_loader($loader);
244 libxml_use_internal_errors($errors);
246 $parse_result = @$this->doc->loadXML($xml_string);
249 if (!$parse_result) {
253 if (isset($this->doc->doctype)) {
257 $this->xpath =
new DOMXPath($this->doc);
268 return $this->xpath->registerNamespace($prefix, $uri);
274 $result = @$this->xpath->query($xpath, $node);
276 $result = @$this->xpath->query($xpath);
285 for ($i = 0; $i <
$result->length; $i++) {
295 return $node->textContent;
302 $arr = $node->attributes;
306 for ($i = 0; $i < $arr->length; $i++) {
307 $node = $arr->item($i);
308 $result[$node->nodeName] = $node->nodeValue;
332 $__Auth_Yadis_defaultParser = $parser;
337 return array(
'dom' =>
'Auth_Yadis_dom',
338 'domxml' =>
'Auth_Yadis_domxml');
351 if (isset($__Auth_Yadis_defaultParser)) {
357 if (extension_loaded($extension))
359 $p =
new $classname();
registerNamespace($prefix, $uri)
& evalXPath($xpath, $node=null)
registerNamespace($prefix, $uri)
registerNamespace($prefix, $uri)
global $__Auth_Yadis_defaultParser
Auth_Yadis_setDefaultParser($parser)
init($xml_string, $namespace_map)
if($list_of_literals) if(!empty($literals)) if(!empty($literals)) $result
Analyse literals to prepend the N char to them if their contents aren't numeric.
& evalXPath($xpath, $node=null)
Auth_Yadis_getSupportedExtensions()
& evalXPath($xpath, $node=null)
Auth_Yadis_getXMLParser()