Insert Trigger of XMLType table
399118Jul 16 2003 — edited Jul 28 2003Is there any way to modify XML document in the insert trigger of XMLType table?
To preserve unique constraint of @uniqueID attribute in the XMLType table, I declare IDGEN_SEQ sequence and apply it to change the value of @uniqueID attibute by updateXML() function in the Insert Trigger.
declare
XMLDATA xmltype;
begin
XMLDATA := :new.sys_nc_rowinfo$;
Select updateXML(XMLDATA, '//@uniqueID', IDGEN_SEQ.nextval) into XMLDATA from dual;
:new.sys_nc_rowinfo$ := XMLDATA;
end;
It lists a error message, "ORA-25003 cannot change NEW values for this column type in trigger".
Thanks in advance.
Jin.