From: choor at bigmir dot net
Operating system: FreeBSD 4.7-RELEASE & Windows XP
PHP version: 4.3.3
PHP Bug Type: *XML functions
Bug description: xml_parse() function error
Description:
------------
xml_parse() function error.
This error appears every time xml_parse() function found "&"(ampersand) in
xml-content.
XML file Example:
10: ...
11: <item>
12: <title>Command & Conquer: Generals</title>
13: <txt>Command & Conquer: Generals - Game Addon</txt>
14: <category>Games/Red Alert</category>
15: </item>
16: ...
This error will occur in line 12, if I cut '&' there then error will occur
in line 13.
If I cut all '&' no errors will occur.
Reproduce code:
---------------
Standart code from PHP manual:
if (!xml_parse($xml_parser, $data, feof($fp)))
{
die(sprintf("XML error: %s at line %d",
xml_error_string(xml_get_error_code($xml_parser)),
xml_get_current_line_number($xml_parser)));
}
Expected result:
----------------
Formated HTML text.
Actual result:
--------------
XML error: not well-formed (invalid token) at line 12
--
Edit bug report at http://bugs.php.net/?id=25549&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=25549&r=trysnapshot4
Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=25549&r=trysnapshot5
Fixed in CVS: http://bugs.php.net/fix.php?id=25549&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=25549&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=25549&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=25549&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=25549&r=support
Expected behavior: http://bugs.php.net/fix.php?id=25549&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=25549&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=25549&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=25549&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=25549&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=25549&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=25549&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=25549&r=gnused