How update xml data with nvarchar2 values
I have following table
Create table tb_test
(myid number, Xmlstring nclob);
I insert the following record into the table
insert into tb_test (myid, Xmlstring) values (1,
n'<Permits>
<BPermit>
<Signature>
<Labels ID="WorkDocPermitsSignature">
<Label Lang="de">deą-Naam en Handt. operat. manag.</Label>
</Labels>
<Name>
<Field/>
</Name>
</Signature>
</BPermit>
</Permits>');
Note: the speciaal char ą = nchr(462) in the table.
Then I want to update the signature in de xmlstring-field
I use following stmt
declare
vReplace varchar2(50) := '/Permits/BPermit/Signature/Name';
inXMLSTRING varchar2(50) := '<Name><Field>Here comes my Name></Field></Name>';
begin
update tb_test
set xmlstring = updatexml(xmltype(xmlstring),vReplace,inXMLSTRING).getClobVal()