code: public void printTo( Writer out ) throws IOException
      {
  		try
  		{
  			transformerFactory.newTransformer().transform(new DOMSource(dom), new StreamResult(out));
  		}
  		catch (TransformerException ex)
  		{
  			throw new IOException(ex.getMessage());
  		}
  	}
docs: {@inheritDoc}