#25549 [Opn->Bgs]: xml_parse() function error
| From: | iliaa@php.net | Date: | Mon, 15 Sep 2003 22:17:18 +0000 |
| Subject: | #25549 [Opn->Bgs]: xml_parse() function error | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-47601@lists.php.net to get a copy of this message | ||
ID: 25549
Updated by: iliaa@php.net
Reported By: choor at bigmir dot net
-Status: Open
+Status: Bogus
Bug Type: *XML functions
Operating System: FreeBSD 4.7-RELEASE & Windows XP
PHP Version: 4.3.3
New Comment:
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php
& should be & in valid XML.
Previous Comments:
------------------------------------------------------------------------
[2003-09-15 16:06:20] choor at bigmir dot net
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 this bug report at http://bugs.php.net/?id=25549&edit=1