Don't do that. Decode them using HTML::Entities, preferrably to UTF-8, and stick that in the XML. If your XML documents are not in UTF-8 encoding, your XML generator should entitify automatically characters the encoding cannot natively represent, without requiring any particular care of you. If you're not using an XML generator, you should be.
For good measure, in case you aren't familiar with the subject, read The Absolute Minimum Every Software Developer Absolutely, Positively Must Know About Unicode and Character Sets (No Excuses!)
Makeshifts last the longest.