note 97434 modified in domdocument.savexml by danbrown
| From: | danbrown@php.net | Date: | Mon, 19 Apr 2010 18:37:26 +0000 |
| Subject: | note 97434 modified in domdocument.savexml by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-168428@lists.php.net to get a copy of this message | ||
If your data is UTF-8-encoded and you discover that saveXML() turned all non-ASCII characters into
numeric entities (e.g. ä -> ö):
Chances are that the XML declaration has been missing when you loaded the source data. Try adding
<?xml version="1.0" encoding="UTF-8"?> to the beginning of the document
before you read it with load() or loadXML(). Then the non-ASCII characters should remain untouched.
Worked for me.
--was--
If your data is UTF-8-encoded and you discover that saveXML() turned all non-ASCII characters into
numeric entities (e.g. ä -> ö):
Chances are that the XML declaration has been missing when you loaded the source data. Try adding
<?xml version="1.0" encoding="UTF-8"?> to the beginning of the document
before you read it with load() or loadXML(). Then the non-ASCII characters should remain untouched.
Worked for me.
(This will probably solve the problem vikramvmalhotra at hotmail dot com has described below.)
http://php.net/manual/en/domdocument.savexml.php