Whenever I parse a string to SQL XML datatype I notice that carriage-returns disappear whenever whitespace and XML carriage returns are mixed. If they are not mixed things work fine. Does anyone know why this is happening?
See the SQL example code below
DECLARE @var XML
PRINT 'This is a statement with two XML carriage-return characters'
SET @var = CONVERT (XML,'<root>Dear Sir,

I am passing CR</root>',1)
SELECT @var
PRINT 'output is identical to a statement with two whitespace carriage-return characters'
SET @var = CONVERT (XML,'<root>Dear Sir,
I am passing CR</root>',1)
SELECT @var
PRINT 'Why does this statement only display one space? There is an XML carriage-return AND a whitespace carriage-return character.'
--Make sure there is no space after 
 after you've copied and pasted the code
SET @var = CONVERT (XML,'<root>Dear Sir,
I am passing CR</root>',1)
SELECT @var