|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2014-06-19 12:57 UTC] pgtest at gmail dot com
[2014-06-19 13:40 UTC] pgtest at gmail dot com
[2016-12-22 10:55 UTC] arnoutboks at gmail dot com
[2017-01-02 12:00 UTC] krakjoe@php.net
[2017-01-02 12:00 UTC] krakjoe@php.net
-Status: Open
+Status: Closed
[2017-01-02 12:00 UTC] krakjoe@php.net
[2017-01-02 12:01 UTC] krakjoe@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Wed Jan 07 01:00:01 2026 UTC |
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