#38949 [Asn->Csd]: Cannot get xmlns value attribute

From: Date: Wed, 27 Sep 2006 10:33:10 +0000
Subject: #38949 [Asn->Csd]: Cannot get xmlns value attribute
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-102801@lists.php.net to get a copy of this message
ID: 38949 Updated by: rrichards@php.net Reported By: superruzafa at gmail dot com -Status: Assigned +Status: Closed Bug Type: DOM XML related Operating System: Windows XP PHP Version: 5.1.6 Assigned To: rrichards New Comment: This bug has been fixed in CVS. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. Thank you for the report, and for helping us make PHP better. 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

« previous php.bugs (#102801) next »