in reply to Encode text to XML €

Something else to keep in mind is your XML's default encoding. I ran into problems where valid XML (according to one system) were being rejected by another. It turns out that the original system was assuming the XML was encoded in iso-8859-1 while my system took a default of utf-8. The problem was easily fixed by adding a XML declaration with the correct encoding.

Default:
<?xml version='1.0' encoding='utf-8'?>

Correct (for me in this instance):
<?xml version='1.0' encoding='iso-8859-1'?>