Hi All
I have this xml that I need to add element with a prefix. I need to update an existing xml in a BD and this element tag <prefix:Surname> James </prefix:Surname>
the xml is like this:
<prefix:Root>
<prefix:ID>value</prefix:ID>
<prefix:name>value</prefix:name>
</prefix:Root>
I tried using:
SET @tesxml.modify('insert <prefix:Surname>{sql:variable("@GetValue")}</prefix:Surname> as last into (//*:Root)[1]')
I get this error:
XQuery [modify()]: The namespace prefix 'ns3' has not been defined
Does anyone know how I can fix this.
Thanx.