#38949 [Opn->Asn]: Cannot get xmlns value attribute
| From: | tony2001@php.net | Date: | Tue, 26 Sep 2006 08:59:49 +0000 |
| Subject: | #38949 [Opn->Asn]: Cannot get xmlns value attribute | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-102681@lists.php.net to get a copy of this message | ||
ID: 38949
Updated by: tony2001@php.net
Reported By: superruzafa at gmail dot com
-Status: Open
+Status: Assigned
Bug Type: DOM XML related
Operating System: Windows XP
PHP Version: 5.1.6
-Assigned To:
+Assigned To: rrichards
Previous Comments:
------------------------------------------------------------------------
[2006-09-25 14:18:43] superruzafa at gmail dot com
Description:
------------
Surely this is not a bug, because is too obvious, Perhaps is a fault of
W3C spec.
I have a xml file, and I try to parse to get xmlns's attributes.
Simplely:
[test.xml]
<?xml version="1.0" encoding="utf-8" ?>
<root xmlns="http://ns" xmlns:ns2="http://ns2">
<ns2:child />
</root>
Reproduce code:
---------------
$xml=new DOMDocument();
$xml->load("test.xml");
echo $xml->documentElement->getAttribute("xmlns");
Expected result:
----------------
"http://ns"
Actual result:
--------------
""
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=38949&edit=1