#36443 [Opn->Bgs]: Parser gives errors when meeting & &eur;

From: Date: Sat, 18 Feb 2006 16:21:00 +0000
Subject: #36443 [Opn->Bgs]: Parser gives errors when meeting & &eur;
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-93404@lists.php.net to get a copy of this message
ID: 36443 Updated by: derick@php.net Reported By: iongion at email dot ro -Status: Open +Status: Bogus Bug Type: SimpleXML related Operating System: Windows, Linux PHP Version: 5CVS-2006-02-18 (CVS) New Comment: You didn't define the &euro; entity in your XML. It's an *HTML* entity, if you want to use that in XML you have to define it. Previous Comments: ------------------------------------------------------------------------ [2006-02-18 17:06:04] iongion at email dot ro Description: ------------ SimpleXML Parser gives errors when meeting &amp; &eur; and other used type of entities. Reproduce code: --------------- <?xml version="1.0" encoding="utf-8"?> <quizz name="QuizName"> <item> Me &amp; Myself and Irene </item> <item> The conversion rate is 0.80&euro; for 1$ </item> </quizz> Expected result: ---------------- I would expect to parse a correct string, to have in: item[0] = "Me &amp; Myself and Irene" , that i would further use to output in a html page "Me & Myself and Irene" item[1] = "The conversion rate is 0.80&euro; for 1$", that i would further use to output in a html page: "The conversion rate is 0.80€ for 1$ Actual result: -------------- The script breaks, the parser screams out loud "unknown entity" ... it doesnt even ignore those entities, it simply dies. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=36443&edit=1

« previous php.bugs (#93404) next »