Update xs:any element
  Home FAQ Contact Sign in
microsoft.public.sqlserver.xml only
 
Advanced search
POPULAR GROUPS

more...

 Up
Update xs:any element         

Group: microsoft.public.sqlserver.xml · Group Profile
Author: Leon Mayne
Date: Sep 2, 2008 06:27

I'm trying to do a simple 'replace value of' for an element in an XML
column whose XSD looks like:

[snip]



processContents="skip"/>



[snip]

I've tried using various syntaxes:

xmlEmail.modify('replace value of (/email/body/text())[1] with "

Task
has been assigned

"')

gives:

XQuery [@tblTasks.xmlEmail.modify()]: Result of 'text()' expression is
statically 'empty' (SQL error = 2377)

xmlEmail.modify('replace value of (/email/body)[1] with
xs:string("

Task has been assigned

")')

gives:

XQuery [@tblTasks.xmlEmail.modify()]: The target of 'replace value of'
must be a non-metadata attribute or an element with simple typed
content, found 'element(body,#anonymous) ?' (SQL error = 2356)

Does anyone know how to update this element?
2 Comments
diggit! del.icio.us! reddit!

RELATED THREADS
SubjectArticles qty Group
replacing xml elements with other elements using lxmlcomp.lang.python ·