No more invalid XML characters

Have you ever tried to output a string from java to XML, just to get this message once you tried opening the XML file:
XML Parsing Error: reference to invalid character number
Well, today I have. As some of you might already know, valid UTF8 string does not imply that it’s a valid XML string. Looking around [...]