title: Line break(s) in the XML resulting file of sp_db_sendmail
body: <p>I'm using sp_db_sendmail to send XML files as a direct result of a query.
  The code is as below:</p>
  
  <pre><code>DECLARE @qry nvarchar(max), @Vendor varchar(20)
  set @Vendor='vcode'
  
  SET @qry=' SET NOCOUNT ON; 
             select 
                   OrderHeader.No [OrderNo]
                  ,OrderHeader.[Date] [OrderDate]
                  ,OrderLines.[Line] [LineNo]
                  ,OrderLines.[CrossRefNo] [Barcode]
                  ,OrderLines.[UoM] [Unit]
                  ,OrderLines.Quantity
                  from dbo.OrderHeader 
                  ....
              where OrderHeader.[Pay-to Vendor No_]=''' + @Vendor + ''' 
              order by OrderHeader.No, OrderLines.[Line]
              FOR XML AUTO,ELEMENTS,TYPE,ROOT(''Orders'')'
  
  EXEC msdb.dbo.sp_send_dbmail
    @profile_name = 'SQLMailProfile',
    @recipients = 'myMailhere@somewhere.com',
    @body= 'A body here',
    @subject = 'A subject',
    @query = @qry,
    @query_attachment_filename='Orders.xml',
    @attach_query_result_as_file =1,
    @query_result_header=0,
    @query_no_truncate=1 
  </code></pre>
  
  <p>Everything works OK apart from the resulting XML file, which at the 256 column it creates a line break thus ruining the XML document validity.</p>
  
  <p>I searched a lot around the web and no solution came up, or at least I did not see one.</p>
  
  <p>Any ideas will be greatly appreciated.</p>