Last post Sep 02, 2010 06:10 AM by Anderslm
Aug 09, 2010 05:12 AM|Metalore|LINK
We have a xml datatype in SQL server which gets a xml file loaded into it. We want to replace some of the content in the xml datatype, but are running into problems converting from xml to varchar(for manipulation purposes), back to xml to output.
Does anyone know of a way to replace xml without converting to varchar?
Thanks in advance
Aug 09, 2010 11:58 AM|ketan_al|LINK
Please refer following
hope this helps
Aug 10, 2010 06:13 AM|Metalore|LINK
Thanks for sending links, these were not helpful for fixing my prob though...
Anyone have any other ideas?
Aug 10, 2010 10:05 AM|Martin_Honnen|LINK
Why are the links not helpful? Part of the MS SQL Server xml datatype features
are DML operations delete, update and insert described in one of the linked sections. I think that is what you want to do, manipulate XML data stored in a column of type xml.
Aug 10, 2010 11:27 AM|Metalore|LINK
The reason why the links are not helpful is because we were not able to change the node name which was not possible using the following;
replace value of
Just this min got a solution using a conversion from xml to varbinary and back to xml - varchar was giving strange characters with accented characters as we were converting source UTF-16 to UTF-8. At last it's working!!
Thanks to both of you for the input.
Sep 02, 2010 06:10 AM|Anderslm|LINK
I have the same problem, could you please post your solution? That would help me a lot! :)