Added tested XMLTemplateWriter for writing xml templates