Convert Varchar to Xml in Sql Server

Here is a small code snippet to convert you varchar data to XML data

declare @data varchar(100) set @data ='



select convert(xml,@data) 
  
  
The data will be converted into XML. 
  
Cheers, 
Venkatesan Prabu .J
Next Recommended Reading Convert Data Table to XML in SQL Server