Re: How to update node into xml variable?
- From: "Han" <hp4444@xxxxxxxxxxxxxxxx>
- Date: Sun, 8 Apr 2007 12:03:54 +0900
Hello
You can't update nodes with XML variable. Instead, you may want to query and
re-compose xml. Something like
select @myxml.query('/*/*[1]'), @newvalue for xml path('root')
<Radovan Dobri? <radovan@xxxxxxxxxxx>> wrote in message
news:%237Su7AFeHHA.208@xxxxxxxxxxxxxxxxxxxxxxx
Hi, I have two variables.
declare @myxml xml,@newvalue xml
set @myxml='
<root>
<node1>
<node11> val1</node11>
<node12> val2</node12>
</node1>
<node2>
<node21></node21>
</node2>
</root>'
Set @newvalue='
<node2>
<node21> val21 </node21>
<node22> val22 </node22>
</node2>'
I wont to update @myxml with @newvalue, so that result in @myvalue would
be:
'
<root>
<node1>
<node11> val1</node11>
<node12> val2</node12>
</node1>
<node2>
<node21> val21 </node21>
<node22> val22 </node22>
</node2>
</root>
'
Thanks in advance
radovan
.
- References:
- How to update node into xml variable?
- From: Radovan Dobriæ
- How to update node into xml variable?
- Prev by Date: Re: modify() Top-level attribute nodes are not supported Error
- Next by Date: Data Transfer via Email
- Previous by thread: Re: How to update node into xml variable?
- Next by thread: Data Transfer via Email
- Index(es):
Relevant Pages
|