My Oracle Support Banner

How To Parameterize String Values To UPDATEXML And DELETEXML Functions (Doc ID 1542980.1)

Last updated on APRIL 29, 2020

Applies to:

Oracle Database - Enterprise Edition - Version 11.2.0.3 and later
Information in this document applies to any platform.

Goal

How to parameterize string values to UPDATEXML and DELETEXML functions.

Ready TEST case is presented below:

The string values: for XML nodes Role, StaffSurnameand StaffGivenName are A,B,C
in the below example:

--DELETE
--------------------------------------------------------
  select deletexml(sys_nc_rowinfo$,
  '/flc:FlightLeg/Contacts/Contact[Role="A" and StaffSurname="B" and StaffGivenName="C"]',
  'xmlns:flc="http://www.xx.com/xx/xx/FlightLegV01"')
  from test13;

--MODIFY
--------------------------------------------------------
select updatexml(sys_nc_rowinfo$,
  '/flc:FlightLeg/Contacts/Contact[Role="A" and StaffSurname="B" and StaffGivenName="C"]',
  xmltype('
  
A
B
C
56

'),
  'xmlns:flc="http://www.xx.com/xx/xx/FlightLegV01"'
  )
from test13;
 

Solution

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Goal
Solution


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.