Using viewBuilder for XML adds extra line in file

When using viewBuilder to render an XML file, and extra line is added to the end of the file. This is causing some validation errors in Google. How can this extra line be removed?