I have an xml file which is base64 encoded and the base64 encoded file is stored as a clob. I want to do all the manipulation in PL/SQL and modify the clob column with one of xmltype
Heres the steps I've got so far:
i) convert the clob to a blob using dbms_lob.converttoclob
ii) Since this is now in binary format I'm asusming that I don't need to cast to raw
iii) decode the binary file using UTL_ENCODE.base64_decode
iv) add an additional column temp_xml as type xml_type
v) update the temp_xml column with the values of the original column.
update <tablename>
set temp_xml = xmltype(orig_clob_column)
vi) At this stage I will see if I can read the xml in the new column and if all is successful, I will drop the orig_clob_column and rename temp_xml to orig_clob_column.
If I've missed anything or anyone's got some gotchas for me, it would be appreciated.
Message was edited by:
Keith Jamieson
Message was edited by:
Keith Jamieson