Re: getElementsByTagName returns subset if elements are arbitrarily nested

From: Date: Mon, 08 Dec 2003 16:08:34 +0000
Subject: Re: getElementsByTagName returns subset if elements are arbitrarily nested
References: 1  Groups: php.xml.dev 
Request: Send a blank email to php-xml-dev+get-264@lists.php.net to get a copy of this message
On Dec 8, 2003, at 10:57 AM, Philip Fletcher wrote:
foreach($dom->getElementsByTagName('c') as $elem ) { echo $elem->getAttribute('name'); } Will return only c1. If the closing </b> is moved below the closing of "c2", then c1c2 will be returned. This is not what I'd expect (I would like 'c1c2c3' as per xpath query '//c' ) - have I misinterpreted the w3c spec?
This works correctly for me. Maybe you have an old version of libxml2? -adam -- adam trachtenberg adam@trachtenberg.com

« previous php.xml.dev (#264) next »