I have some text in a MSSQL database which contains characters such as &>< etc. I am using T_SQL to create some xml from the information contained within the database.

Does anyone know how to convert the characters to their entities i.e. > become &gt; and & becomes &amp; ?

cheers

monkey