ID: 46352 Updated by: [EMAIL PROTECTED] Reported By: gregoire dot berclaz at students dot hevs dot ch -Status: Open +Status: Bogus Bug Type: SimpleXML related Operating System: Windows PHP Version: 5.2.6 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 You need to use DOM for the more complex functionality due to attribute escaping rules. Previous Comments: ------------------------------------------------------------------------ [2008-10-21 07:44:52] gregoire dot berclaz at students dot hevs dot ch Description: ------------ The function addAttribute convert html entities like "é" => "&eacute;" Reproduce code: --------------- $simpleXml = simplexml_load_string("<?xml version=\"1.0\" encoding=\"ISO-8859-1\" ?><!DOCTYPE dtdsite SYSTEM \"http://www.monsite.dev/dtd.dtd\"><xml></xml>", null, LIBXML_DTDLOAD); $config = $simpleXml->addChild("config", "é"); $config->addAttribute("langue", "é"); Expected result: ---------------- <xml> <config langue="é">é</config> </xml> Actual result: -------------- <xml> <config langue="&eacute;">é</config> </xml> ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=46352&edit=1