How can I retain CDATA tags when storing query results in an Xml variable?

You can’t. The XML data type does not preserve CDATA sections.

Have a look here for a discussion about the subject.

http://social.msdn.microsoft.com/forums/en-US/sqlxml/thread/e22efff3-192e-468e-b173-ced52ada857f/

Leave a Comment