Code example for DOMSource

0
	@Override 
	public final Document transform(final Document sourceMessage)
			throws TransformerException { 
 
		try { 
			final DOMSource source = new DOMSource(sourceMessage);
			Document result;
			DOMResult target = new DOMResult();
			target = (DOMResult) super.transform(source, target);
			result = (Document) target.getNode();
			if (NullChecker.isEmpty(result)) {
				throw new TransformerException("Empty output from transformer!");
			} 
			return result;
 
		} catch (final javax.xml.transform.TransformerException ex) {
			throw new TransformerException(ex);
		} 
	} 
}