#40539 [Opn->Asn]: Invisible attributes in XML loaded with default namespace
ID: 40539
Updated by: tony2001@php.net
Reported By: vrana@php.net
-Status: Open
+Status: Assigned
Bug Type: SimpleXML related
Operating System: Windows
PHP Version: 5.2.1
-Assigned To:
+Assigned To: helly
Previous Comments:
------------------------------------------------------------------------
[2007-02-19 10:01:16] vrana@php.net
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 this bug report at http://bugs.php.net/?id=40539&edit=1
Thread (3 messages)