Good thing I checked, not what I thought you wanted at all
This will do it, just put an opening tag at the beginning, a closing tag at the end and then replace all carriage returns with an open and a close. Much easier with SQL Server 2005 because you can use varchar(max) instead of text for the column type and varchar(max) lets you use string functions like replace. You should change your column to varchar(max) if it isn't already.select daydesc as description , cast('<feature>' + replace(Features, char(13)+char(10), '</feature><feature>') + '</feature>' as xml) AS Features, adfull, askprice, bedrooms as bedroom,rooms, floorarea as sqm, (pADDRESS1 + ''+ PADDRESS2+ ''+PADDRESS2 + ''+PADDRESS3+ ''+ PADDRESS4) AS ADDRESS ,directions from dbo.PROPERTY as Property where property_id = @id for xml auto,elementsIf Features is text instead of varchar(max), you'll get an error saying you cannot use the text data type with the replace function. As I said I'd recommend that you change the column, but you could also do this in the queryselect daydesc as description , cast('<feature>' + replace(cast(Features as varchar(max)), char(13)+char(10), '</feature><feature>') + '</feature>' as xml) AS Features, adfull, askprice, bedrooms as bedroom,rooms, floorarea as sqm, (pADDRESS1 + ''+ PADDRESS2+ ''+PADDRESS2 + ''+PADDRESS3+ ''+ PADDRESS4) AS ADDRESS ,directions from dbo.PROPERTY as Property where property_id = @id for xml auto,elements