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

后端 未结 1 1212
一生所求
一生所求 2020-12-04 01:53

When I generate Xml in Sql Server 2008 R2 using For Explicit (because my consumer wants one of the elements wrapped in CDATA) and store the results in an Xml variable, the d

相关标签:
1条回答
  • 2020-12-04 02:26

    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/

    0 讨论(0)
提交回复
热议问题