From:             lussenburg_rm at hotmail dot com
Operating system: windows 7
PHP version:      Irrelevant
Package:          XML Reader
Bug Type:         Bug
Bug description:xml data parsing bug

Description:
------------
---
>From manual page:
http://www.php.net/xmlreader.read#refsect1-xmlreader.read-description
---
The bug isn't realy in the code so im not including any script here, but it
is related to the xml input. For example i'm reading some rss feeds (note
that i neither compose, nor responsible for the layout) that look like
this:

<rss>
 <channel>
  <title>feed title</title>
  <description>feed description</description>
  <pubDate>Mon, 29 Oct 2012 13:30:00 +0100</pubDate>
  <item>
    <title>item title</title>
    <description>item description</description>
    <link>http://itemlink</link>
  </item>
  <item>
    <title>item title</title>
    <description>item description</description>
    <link>http://bla</link>
  </item>
  ...
 </channel>
</rss>

Everything was working perfectly fine until i kept getting values from the
first 'item title' and 'item description' in the 'feed title' and 'feed
description' node values. When i examined the xml data i found out that it
only happens when the first <item> tag directly follows the last of the
<channel> nodes (<title>, <description>, <pubDate> etc) without a carriage
return/newline.
To work around this, before passing the data to XMLReader::xml(), i replace
all occurences of "><item>" with ">\r\n<item>", which works fine, but maybe
it could be resolved so this workaround isn't neccesary anymore.



-- 
Edit bug report at https://bugs.php.net/bug.php?id=63430&edit=1
-- 
Try a snapshot (PHP 5.4):   
https://bugs.php.net/fix.php?id=63430&r=trysnapshot54
Try a snapshot (PHP 5.3):   
https://bugs.php.net/fix.php?id=63430&r=trysnapshot53
Try a snapshot (trunk):     
https://bugs.php.net/fix.php?id=63430&r=trysnapshottrunk
Fixed in SVN:               https://bugs.php.net/fix.php?id=63430&r=fixed
Fixed in release:           https://bugs.php.net/fix.php?id=63430&r=alreadyfixed
Need backtrace:             https://bugs.php.net/fix.php?id=63430&r=needtrace
Need Reproduce Script:      https://bugs.php.net/fix.php?id=63430&r=needscript
Try newer version:          https://bugs.php.net/fix.php?id=63430&r=oldversion
Not developer issue:        https://bugs.php.net/fix.php?id=63430&r=support
Expected behavior:          https://bugs.php.net/fix.php?id=63430&r=notwrong
Not enough info:            
https://bugs.php.net/fix.php?id=63430&r=notenoughinfo
Submitted twice:            
https://bugs.php.net/fix.php?id=63430&r=submittedtwice
register_globals:           https://bugs.php.net/fix.php?id=63430&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=63430&r=php4
Daylight Savings:           https://bugs.php.net/fix.php?id=63430&r=dst
IIS Stability:              https://bugs.php.net/fix.php?id=63430&r=isapi
Install GNU Sed:            https://bugs.php.net/fix.php?id=63430&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=63430&r=float
No Zend Extensions:         https://bugs.php.net/fix.php?id=63430&r=nozend
MySQL Configuration Error:  https://bugs.php.net/fix.php?id=63430&r=mysqlcfg

Reply via email to