note 84795 modified in function.simplexml-element-registerXPathNamespace by danbrown

From: Date: Wed, 30 Jul 2008 18:20:09 +0000
Subject: note 84795 modified in function.simplexml-element-registerXPathNamespace by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-142943@lists.php.net to get a copy of this message
A handy timesaver: <?php $sxe = simplexml_load_file($path); //Fetch all namespaces $namespaces = $sxe->getNamespaces(true); //Register them with their prefixes foreach ($namespaces as $prefix => $ns) { $sxe->registerXPathNamespace($prefix, $ns); } ?> --was-- A handy timesaver: $sxe = simplexml_load_file($path); //Fetch all namespaces $namespaces = $sxe->getNamespaces(true); //Register them with their prefixes foreach ($namespaces as $prefix => $ns) { $sxe->registerXPathNamespace($prefix, $ns); } http://php.net/manual/en/function.simplexml-element-registerXPathNamespace.php

« previous php.notes (#142943) next »