I want a function to pass a text (varchar2) and a tag name and return the text with the tag and their child tags removed Keep only
I don't know how levels of childs there are under tag.
Input :
set serverouput on
declare
v_input_str varchar(4000) := ' <parent1>
<Message>12ab</Message>
<CreationDate>02/08/2015</CreationDate>
<Total>500.45</Total>
<Collect>
<Name>Peter</Name>
</Collect>
</parent1>';
begin
dbms_output.put_line(v_input_str);
end;
/
output :
' <parent1>
<Message>12ab</Message>
<CreationDate>02/08/2015</CreationDate>
<Total>500.45</Total>
<Collect/>
</parent1>'
Thanks in advance