Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Insert new Child Node in XML

ASK_NMJun 19 2018 — edited Jun 20 2018

Dear All

I have written a following query to insert new child node inside a CLOB column, the content inside the CLOB is an XML.

update  test_tbl SET new_xml = appendChildXML(xmltype(new_xml), '/EMP/Emp_id/EmpName/EmpSal',  xmlType('<EmpBonus>500</EmpBonus>')).getClobVal()  where emp_id = '4070';

The new childnode is getting inserted, but after insertion the XML format is completely changed. the entire XML is appearing in one single Line. Could someone please help me out here ?

This post has been answered by mNem on Jun 19 2018
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 18 2018
Added on Jun 19 2018
5 comments
3,173 views