We are using SQL Server 2005 and trying to store the XML type in the database. The XML type has an element that should contain content in CDATA, but after setting it, the field seems to strip CDATA and save the element without it ...
Has anyone experienced or even solved this in the past?
A handy example:
create table t (x xml)
insert into t values ('<test>kjhghk</test>')
insert into t values ('<test><![CDATA[kjhghk]]></test>')
select * from t
drop table t
results:
<test>kjhghk</test>
<test>kjhghk</test>
source
share