I want to create a XML where blanks are replaced by . But the Java-Transformer escapes the Ampersand, so that the output is  
 
Set the text content directly to the character you want, and the serializer will escape it for you if necessary:
element.setTextContent("\u00A0");