Remove the xml declaration  by use
transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "yes")