if you are storing multi-byte characters in XML, then saving the XML using saveXML() will create problems. It will spit out the characters converted in encoded format.
<?php
$str = domdoc->saveXML(); // gives "&x#1245;" some encoded data
?>
Instead do the following
<?php
$str = domdoc->saveXML(domdoc->documentElement); // gives "保存しました" correct multi-byte data
?>