Monthly Archives: April 2010

Modify element value for typed and untyped xml

First, let’s define an untyped xml and modify it:   declare @x xml SET @x=N‘ <Properties xmlns="http://www.xyz.com/p01"&gt;       <Version>1.0.0</Version>       <MyProperties>       <Property>P1</Property>       </MyProperties> </Properties>’ /* — comment 1 SET @x.modify(‘ declare namespace p="http://www.xyz.com/p01&quot;; replace value of (/p:Properties/p:Version/text())[1] with  … Continue reading

Posted in XML, XQuery and XPath | 2 Comments