#24392 [Asn->Csd]: simplexml failure on slashdot.rdf
| From: | sniper@php.net | Date: | Sat, 29 Nov 2003 06:56:43 +0000 |
| Subject: | #24392 [Asn->Csd]: simplexml failure on slashdot.rdf | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-51310@lists.php.net to get a copy of this message | ||
ID: 24392
Updated by: sniper@php.net
Reported By: shane@php.net
-Status: Assigned
+Status: Closed
Bug Type: XML related
Operating System: win32
PHP Version: 5CVS-2003-06-29 (dev)
Assigned To: sterling
New Comment:
Open new report about the leaks..
Previous Comments:
------------------------------------------------------------------------
[2003-07-19 09:08:57] sniper@php.net
Sterling, fix the leaks. :-p
------------------------------------------------------------------------
[2003-07-19 08:54:41] helly@php.net
SimpleXML leaks....
------------------------------------------------------------------------
[2003-06-30 12:53:11] sterling@php.net
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.
------------------------------------------------------------------------
[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