Capture stdout and stderr into XML