My Oracle Support Banner

How to Update an Attribute Inside an XML Tag from an XML Document (Doc ID 2445174.1)

Last updated on APRIL 17, 2023

Applies to:

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


How to correct a recurring issue of an attribute being NULL / or not present. Consider the following sample document:
<?xml version="1.0" encoding="WINDOWS-1252"?>
<pcc pcc-type="" xmlns="urn:oma:xml:cab:pcc" xmlns:xsi="">
 <person-details index="gt4fd890bu8">
   <name index="fg4fd890der">
     <name-entry index="dslkhdskj" pref="1" xml:lang="en" name-type="LegalName">
        <middle display-order="1">T.</middle>    
     <name-entry index="riuetutl" pref="2" xml:lang="en" name-type="KnownAs">
       <given display-order="1">Balaji</given>

Case 1. <pcc pcc-type="" >;update to individual
whenever the  pcc-type is null/empty , it should update it to identifier as "individual".

Case 2. pcc-type itself is missing:-

  Whenever the pcc-type is missing like below:
a)<pcc xmlns="urn:oma:xml:cab:pcc" xmlns:xsi="">
  pcc-type=individual should be added in tag like below:-
b)<pcc pcc-type="individual"  xmlns="urn:oma:xml:cab:pcc" xmlns:xsi="">


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

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