Re: xml column/xpath w/ sql server
- From: Kenny <burntass@xxxxxxxxx>
- Date: Sun, 6 Apr 2008 00:14:46 -0700 (PDT)
On Apr 5, 12:38 pm, Martin Honnen <mahotr...@xxxxxxxx> wrote:
Kenny wrote:
For the following xml, I want to the below query to update the second
Item element, based off of a that "closedMessage" Key. Any
suggestions? is there some way to make the "replace of" function more
specific than the way I'm using it? thanks in advance.
If you want to update the second Item element then I think you need
set userpreferencesxml.modify('
replace value of (/root/Item/Value/text())[1]
replace value of (/root/Item/Value/text())[2]
as XPath/XQuery indices start with 1.
--
Martin Honnen --- MVP XML
http://JavaScript.FAQTs.com/
Thanks. Is there a way to get that index value using any of the built
in xml functions? nodes() perhaps? or would I need to build some
recursive loop and do some i++ operation?
.
- Follow-Ups:
- Re: xml column/xpath w/ sql server
- From: Martin Honnen
- Re: xml column/xpath w/ sql server
- References:
- xml column/xpath w/ sql server
- From: Kenny
- Re: xml column/xpath w/ sql server
- From: Martin Honnen
- xml column/xpath w/ sql server
- Prev by Date: Insert carriage returns and line feeds in SQL 2000 XML output
- Next by Date: Re: xml column/xpath w/ sql server
- Previous by thread: Re: xml column/xpath w/ sql server
- Next by thread: Re: xml column/xpath w/ sql server
- Index(es):