We are using SQL Server 2005 and are trying to store an XML Type in the database. The XML type has an element that needs to contain the content in CDATA, yet once inserted, the field seems to be stripping the CDATA and storing the element without it...
Has anybody experienced or even resolved this in the past?
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>