From:             [EMAIL PROTECTED]
Operating system: Linux
PHP version:      5.1.4
PHP Bug Type:     SimpleXML related
Bug description:  Namespaced elements completely ignored

Description:
------------
I am not sure if this is an actual bug or intended 
behavior, but there seems to be a BC break in SimpleXML 
regarding namespaced elements. 
 
I had a script which worked under 5.1.0, but after 
upgrading to 5.1.4, it broke. I have not tested it under 
5.1.1-5.1.3. 
 
Previously, (and according to most documentation and things 
I have read, namespaces are ignored, but the element will 
still be loaded in the SimpleXML element. Under 5.1.4, it 
seems namespaced elements are completely ignored. 

Reproduce code:
---------------
<?php
$xml = '<root
xmlns:baz="http://baz.com";><foo>Hello</foo><baz:bar>World</baz:bar></root>';
$xml = simplexml_load_string($xml);
print_r($xml);
?>

Expected result:
----------------
This was the output in 5.1.0. 
 
SimpleXMLElement Object 
( 
    [foo] => Hello 
    [bar] => World 
) 

Actual result:
--------------
Output in 5.1.4 (and possibly .1-.3, I haven't tested). 
 
SimpleXMLElement Object  
(  
    [foo] => Hello  
)  
  

-- 
Edit bug report at http://bugs.php.net/?id=37685&edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=37685&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=37685&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=37685&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=37685&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=37685&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=37685&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=37685&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=37685&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=37685&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=37685&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=37685&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=37685&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=37685&r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=37685&r=php3
Daylight Savings:             http://bugs.php.net/fix.php?id=37685&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=37685&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=37685&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=37685&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=37685&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=37685&r=mysqlcfg

Reply via email to