/** * Creates a new copy Transformer. * * @param options the options. * @return Transformer. * @throws DOMSerializerException if the copy transformer can't be created. */ protected static Transformer createTransformer(final DOMSerializerOptions options) throws DOMSerializerException { try { TransformerFactory fac = TransformerFactory.newInstance(); return applyTransformerOptions(fac.newTransformer(), options); } catch (TransformerConfigurationException e) { throw new DOMSerializerException(e); } }