ID:               28689
 Updated by:       [EMAIL PROTECTED]
 Reported By:      [EMAIL PROTECTED]
-Status:           Open
+Status:           Bogus
 Bug Type:         SimpleXML related
 Operating System: Irrelevant
 PHP Version:      5.0.0RC2
 New Comment:

See #27709.


Previous Comments:
------------------------------------------------------------------------

[2004-06-08 03:06:16] [EMAIL PROTECTED]

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 this bug report at http://bugs.php.net/?id=28689&edit=1

Reply via email to