xml-dml

Inserting an attribute in multiple XML Nodes using XML.modify() in SQL 2005

I have an @XML document created from a single select statement. <root> <node> <node1> <targetNode> </targetNode> </node1> <node1> <targetNode> </targetNode> </node1> <node1> <targetNode> </targetNode> </node1> </node> <node> ...... </node> </root> I want to insert the xsi:nil as an attribute of 'ta...

can't insert xml dml expression as a string

Here is the code below that would explain you the problem... I create a table below with an xml column and declare a variable, initialize it and Insert the Value into the xml column, create table CustomerInfo (XmlConfigInfo xml) declare @StrTemp nvarchar(2000) set @StrTemp = '<Test></Test>' insert into [CustomerInfo](XmlConfigInfo) ...

SQL Server 2008: Rename an element using XML DML?

Is it possible to use an XML DML statement to rename an element in an untyped XML column? I am in the process of updating an XML Schema Collection on an XML column and need to patch the existing XML instances by renaming one element before I can apply the latest schema. As far as I can tell from the docs you can only insert / delete no...