From: [EMAIL PROTECTED] Operating system: Windows PHP version: 5.2.1 PHP Bug Type: SimpleXML related Bug description: Invisible attributes in XML loaded with default namespace
Description: ------------ When I load XML with fourth attribute of simplexml_load_file or simplexml_load_string, attributes are invisible. It's irrelevant if namespace is default (xmlns=) or prefixed (xmlns:x=). Reproduce code: --------------- $text = '<a xmlns="http://example.org"><c a="d">test</c></a>'; $xml = simplexml_load_string($text, null, 0, "http://example.org"); var_dump($xml->c["a"]); Expected result: ---------------- object(SimpleXMLElement)#4 (1) { [0]=> string(1) "d" } Actual result: -------------- NULL -- Edit bug report at http://bugs.php.net/?id=40539&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=40539&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=40539&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=40539&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=40539&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=40539&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=40539&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=40539&r=needscript Try newer version: http://bugs.php.net/fix.php?id=40539&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=40539&r=support Expected behavior: http://bugs.php.net/fix.php?id=40539&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=40539&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=40539&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=40539&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=40539&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=40539&r=dst IIS Stability: http://bugs.php.net/fix.php?id=40539&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=40539&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=40539&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=40539&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=40539&r=mysqlcfg