in thumbnails4j-core/src/main/java/co/elastic/thumbnails4j/core/ThumbnailUtils.java [145:151]
public static Transformer getTransformerForXhtmlDOM() throws TransformerConfigurationException {
Transformer transformer = TransformerFactory.newInstance().newTransformer();
transformer.setOutputProperty(OutputKeys.ENCODING, "UTF-8");
transformer.setOutputProperty(OutputKeys.METHOD, "xml"); // see https://stackoverflow.com/a/5126973/2479282. JPaneEditor uses an xml parser for html
transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "yes");
return transformer;
}