#24392 [Opn->Csd]: simplexml failure on slashdot.rdf

From: Date: Mon, 30 Jun 2003 17:53:13 +0000
Subject: #24392 [Opn->Csd]: simplexml failure on slashdot.rdf
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-42897@lists.php.net to get a copy of this message
ID: 24392 Updated by: sterling@php.net Reported By: shane@php.net -Status: Open +Status: Closed Bug Type: XML related Operating System: win32 PHP Version: 5CVS-2003-06-29 (dev) Assigned To: sterling@php.net New Comment: This bug has been fixed in CVS. In case this was a PHP problem, snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. In case this was a documentation problem, the fix will show up soon at http://www.php.net/manual/. In case this was a PHP.net website problem, the change will show up on the PHP.net site and on the mirror sites in short time. Thank you for the report, and for helping us make PHP better. Previous Comments: ------------------------------------------------------------------------ [2003-06-29 19:22:55] shane@php.net Description: ------------ Sometimes simplexml objects return empty strings, even though var_dump shows the strings. A simple example is using simplexml to parse rdf. I grabbed an rdf from phpbuilder.com, and it worked wonderfully. Grabbed one from slashdot, and failure. Reproduce code: --------------- grab slashdot rdf http://slashdot.org/slashdot.rdf parse with: <?php $rdf = simplexml_load_file('slashdot.rdf'); ?> <table border="1" cellspacing="0" cellpadding="0" bordercolor="#0000FF"> <tr> <td> <table border="0" cellspacing="0" cellpadding="4"> <tr> <td style="background-color:blue; color:white;"><?php echo $rdf->channel->title; ?></td> </tr> <?php foreach ($rdf->item as $item) { // this dump shows the correct data, but emptiness below // var_dump($item); ?> <tr> <td> <a href="<?php echo $item->link; ?>"><?php echo $item->title; ?></a> </td> </tr> <?php } ?> </table> </td> </tr> </table> ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=24392&edit=1

« previous php.bugs (#42897) next »