* DOM Serialiser exception.
* @throws IOException Unable to write to output writer.
* @throws SmooksException Unable to serialise due to bad Smooks environment. Check cause.
*/
public void serialize(Node node, Writer writer) throws IOException, SmooksException {
Serializer serializer;
if (node == null) {
throw new IllegalArgumentException("null 'doc' arg passed in method call.");
} else if (writer == null) {
throw new IllegalArgumentException("null 'writer' arg passed in method call.");
}
if (logger.isDebugEnabled()) {
logger.debug("Starting serialization phase [" + executionContext.getTargetProfiles().getBaseProfile() + "]");
}
serializer = new Serializer(node, executionContext);
try {
serializer.serailize(writer);
} catch (ResourceConfigurationNotFoundException e) {
throw new SmooksException("Unable to serialize document.", e);
}
}