From: s dot masugata at digicom dot dnp dot co dot jp Operating system: RedHat9 Linux PHP version: 4.3.7 PHP Bug Type: DOM XML related Bug description: Reference result of XPath becomes empty.
Description: ------------ Reference result becomes empty when an XML file is searched. <?xml version="1.0" ?> <country> <list no="1"> <name>Japan</name> <language>Japanese</language> <area>Asia</area> </list> </country> Reference result becomes empty when an XML file is searched. However, reference result comes by PHP4.3.3 on the contrary. PHP-4.3.3[cli] PHP-4.3.7[cli] libxml2-2.6.10 Reproduce code: --------------- <? $XML = domxml_open_file( "country.xml" ); foreach( $XML->get_elements_by_tagname( "/country/[EMAIL PROTECTED]" ) as $Array ) { foreach( $Array->child_nodes( ) as $Child_Array ) { $TagName = $Child_Array->node_name( ); $Value[$TagName] = de_convert( $Child_Array->get_content( ) ); } echo "------------------------\n". "Country :".$Value["name"]."\n". "Area F".$Value["area"]."\n". "LanguageF".$Value["language"]."\n\n"; } ?> Expected result: ---------------- ------------------------ Country :Japan Area :Asia Language:Japanese Actual result: -------------- empty. -- Edit bug report at http://bugs.php.net/?id=28916&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=28916&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=28916&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=28916&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=28916&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=28916&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=28916&r=needscript Try newer version: http://bugs.php.net/fix.php?id=28916&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=28916&r=support Expected behavior: http://bugs.php.net/fix.php?id=28916&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=28916&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=28916&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=28916&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=28916&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=28916&r=dst IIS Stability: http://bugs.php.net/fix.php?id=28916&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=28916&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=28916&r=float