I’m using a SQL Server 2005 database and xml inserted in a xml data type column is encoded and the cdata tag is removed. This is by design:
Value Inserted: <person><parents><![CDATA[Mike & Angela Smith]]></parents></person>
Value Returned from a Select: <person><parents>Mike & Angela Smith</parents></person>
I’m retrieving the xml value from the database using Linq-to-Xml (XElement object) and, ideally, I want to create a xml file on disk that is the same as the value inserted without any special treatment such as decoding each text element and adding
the CDATA tags back in.
What is the best way to handle this scenario?
View Complete Post