note 94658 modified in function.simplexml-load-string by danbrown

From: Date: Tue, 17 Nov 2009 15:26:19 +0000
Subject: note 94658 modified in function.simplexml-load-string by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-162985@lists.php.net to get a copy of this message
If you want to set the charset of the outputed xml, simply set the encoding attribute like this : <?php simplexml_load_string('<?xml version="1.0" encoding="utf-8"?><xml/>'); ?> The generated xml outputed by $xml->asXML will containt accentuated characters like 'é' instead of &#xE9;. Hope this help --was-- If you want to set the charset of the outputed xml, simply set the encoding attribute like this : simplexml_load_string('<?xml version="1.0" encoding="utf-8"?><xml/>'); The generated xml outputed by $xml->asXML will containt accentuated characters like 'é' instead of &#xE9;. Hope this help http://php.net/manual/en/function.simplexml-load-string.php

« previous php.notes (#162985) next »