title: Extra Characters while using XML PATH
body: <p>I have a table called Map_Data and the data looks like:</p>
  
  <pre><code> ID    SoCol                                                              Descol  
   125   case Per_rating when 5 then 'Good' when 4 then 'Ok' else null end  D_Code
  </code></pre>
  
  <p>And I wrote a query on this particular row and the query is:</p>
  
  <pre><code>SELECT  Params = ( SELECT   DesCol + ' = ''' + SoCol + ''''
                     FROM     dbo.Map_Data  t1
                     WHERE   ID = 125
                     FOR
                     XML PATH('')
                   )
  </code></pre>
  
  <p>and I get the output as :</p>
  
  <pre><code>D_Code = 'case per_rating&amp;#x0D; when 5 then 'Good'&amp;#x0D; when 4&amp;#x0D; then 'Ok'&amp;#x0D; end'
  </code></pre>
  
  <p>Can anyone tell me why i am getting <code>'&amp;#x0D;'</code> it and how can i correct it?</p>