ID: 37685 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] -Status: Open +Status: Bogus Bug Type: SimpleXML related Operating System: Linux PHP Version: 5.1.4 New Comment:
Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php This was changed so print_r/var_dump respect namespace of initial object - results now the same as if accessing the subtree using ->children() Previous Comments: ------------------------------------------------------------------------ [2006-06-03 01:53:13] [EMAIL PROTECTED] 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 this bug report at http://bugs.php.net/?id=37685&edit=1