From: [EMAIL PROTECTED] Operating system: Irrelevant PHP version: 5.0.0RC2 PHP Bug Type: SimpleXML related Bug description: Without registerNamespace() method, XPath function is crippled
Description: ------------ Because XPath cannot select nodes from the default namespace (i.e. xmlns="foo") an alias must be added. This is possible in the DOM extension using the DomXpath::registerNamespace() method. Because SimpleXML does not have this, its XPath implementation is quite crippled. The only way around this is the following: $sxml = simplexml_load_*($xml) $sxml['xmlns:foo'] = 'http://foo'; $sxml = simplexml_load_string($sxml->asXML()); Which is quite stupid really. - Davey -- Edit bug report at http://bugs.php.net/?id=28689&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=28689&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=28689&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=28689&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=28689&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=28689&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=28689&r=needscript Try newer version: http://bugs.php.net/fix.php?id=28689&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=28689&r=support Expected behavior: http://bugs.php.net/fix.php?id=28689&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=28689&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=28689&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=28689&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=28689&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=28689&r=dst IIS Stability: http://bugs.php.net/fix.php?id=28689&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=28689&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=28689&r=float