Bug #67474 [NEW]: getElementsByTagNameNS and default namespace

From: Date: Thu, 19 Jun 2014 09:02:48 +0000
Subject: Bug #67474 [NEW]: getElementsByTagNameNS and default namespace
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-186250@lists.php.net to get a copy of this message
From: pgtest at gmail dot com Operating system: Windows 7 x64 SP1 PHP version: 5.5.13 Package: DOM XML related Bug Type: Bug Bug description:getElementsByTagNameNS and default namespace Description: ------------ When trying to get all elements from the default namespace (by providing an empty string first argument) getElementsByTagNameNS returns elements from ALL namespaces. In the provided example, getElementsByTagNameNS should return only the first "a" element, not both. Test script: --------------- $doc = new DOMDocument(); $doc->loadXML('<root xmlns:x="x"><a/><x:a/></root>'); $list = $doc->getElementsByTagNameNS('', 'a'); echo $list->length; Expected result: ---------------- 1 Actual result: -------------- 2 -- Edit bug report at https://bugs.php.net/bug.php?id=67474&edit=1 --

« previous php.bugs (#186250) next »