I have an XML like this.
<caseactions
xmlns="http://www.w3schools.com"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.w3schools.com case_actions_info.xsd"
source="argus"
client_id="CL2">
<caseid>101296</caseid>
</caseactions>
Before I insert this to a table (CLOB column) I want to get rid of the 1st 3 attributes. i.e. xmlns, xmlns:xsi and xsi:schemaLocation.
After reading the XML DB user guide (my DB is 11g R2) I tried this:
Select Updatexml(Xmltype('<caseactions xmlns="http://www.w3schools.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.w3schools.com case_actions_info.xsd" source="argus" client_id="CL2"><caseid>101296</caseid></caseactions>'),
'/caseactions/@xmlns', NULL) FROM dual;
But, this does not work. The attribute is still there.
What am I doing wrong here? Any help would be greatly appreciated.