Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 update node vaue with <!CData>

Author  Topic 

slavaflex
Starting Member

1 Post

Posted - 2011-10-13 : 09:02:25
Is there any way to update the value of each node in xml file like this:

<RootNode>
<Item>test1</Item>
<Item>test2</Item>
<Item>test3</Item>
</RootNode>
that is actually xml column in table to the following:

<RootNode>
<Item><![CDATA[test1]]></Item>
<Item><![CDATA[test2]]></Item>
<Item><![CDATA[test3]]></Item>
</RootNode>

When I tried MyXmlColumn.modify('replace value of (...) with "<!CDATA["', modified value was encoded as %lt; instead of <
   

- Advertisement -