|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2003-09-15 18:17 UTC] iliaa@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 08:00:01 2025 UTC |
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