#42141 [Opn->WFx]: DOM getNamedItem() case-issue

From: Date: Sun, 29 Jul 2007 16:15:22 +0000
Subject: #42141 [Opn->WFx]: DOM getNamedItem() case-issue
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-115536@lists.php.net to get a copy of this message
ID: 42141 Updated by: derick@php.net Reported By: linus dot martensson at elplan-gm dot se -Status: Open +Status: Wont fix Bug Type: Feature/Change Request PHP Version: 5.2.3 New Comment: XML is case-sensitive... you'll just have to deal with this in your scripts. Previous Comments: ------------------------------------------------------------------------ [2007-07-29 16:08:51] linus dot martensson at elplan-gm dot se Description: ------------ DOMNamedNodeMap->getNamedItem() is case-sensitive, the ability to change this would be useful in templating systems. Add a second parameter for case-sensitive? Reproduce code: --------------- $xml = new DOMDocument(); $xml->loadXML('<html><head><!--yadayada--></head><body><div Id="testid"></div></body></html>'); $element = $xml->getElementById('testid'); echo $element->attributes->getNamedItem('id'); Expected result: ---------------- should echo "testid", the name of the element retrieved. Actual result: -------------- Echoes nothing, as the 'Id' in the xml is spelt with a capital I. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=42141&edit=1

« previous php.bugs (#115536) next »