A Transform Log step can be used for this purpose, part of its functionality is to add closing XML tags. If you don't want to transform your xml output (but just write it out as xml), simply leave the XSLT stylesheet entry field blank.
See the documentation for more details. Note that starting with version 5.6, the default stylesheet output does include nested builds...
|