Earlier,In TSQL we have an XML column to store the html data with xml serialization. But now we think to keep the html content in CDATA region. How can I convert the existing xml serialized content to the corresponding html content?
e.g. XML serialized column data : <Node Txt="<b>bold text</b>" />
Expected corresponding transform : <Node><![CDATA[<b>bold text</b>]]></Node>
上述转换预计将由sql脚本执行。
我想了一个解决方案来替换所有这5个xml特殊字符对应的替换字符(&;,<;,>;,“等)。但我认为字符串操作在xml到html的转换中可能不起作用。
有什么更干净的方法或想法可以将现有的xml转换为html数据吗?