ID: 38885 Updated by: [EMAIL PROTECTED] Reported By: lhaire at lettres dot unige dot ch -Status: Open +Status: Feedback Bug Type: DOM XML related Operating System: Mandriva Linux/PREFORK-13.3.2006 PHP Version: 5.1.6 New Comment:
Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows: http://snaps.php.net/win32/php5.2-win32-latest.zip Previous Comments: ------------------------------------------------------------------------ [2006-09-19 16:46:11] lhaire at lettres dot unige dot ch Description: ------------ The above method returns false when it was supposed to be true... PHP version: 5.0.4 (the latest in my Mandrake distribution) Reproduce code: --------------- $human = $item->getElementsByTagName('HUMAN_CORR'); $nhum = $human->length; if ($nhum >0){ $j =0; while (($j < $nhum) &&(!$human->item($j)->hasAttribute('expert')) $j++; Expected result: ---------------- This code works: $j =0; while (($j < $nhum) && ($human->item($j)->getAttribute('expert') != 'yes')) $j++; here is a short xml sample: <HUMAN_CORR index="h1" itemTag="i00018" correctchoice="yes">confortable</HUMAN_CORR> <HUMAN_CORR index="he_5" itemTag="i00018" expert="yes" correctchoice="yes">à l'aise</HUMAN_CORR> Actual result: -------------- ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=38885&edit=1
