XMLtype to CLOB conversion
Hi Gurus,
I am trying to convert XML file stored into XMLtype datatype into CLOB through getClobVal function but its not able to write complete text (which is around 1 MB ) into CLOB. When I am checking my XML file after conversion the TEXT tag is not same as it was in the original XML file. In other words-
I have a table TEST_TABLE(TEST_COL XMLtype)
I wrote following function(just pasting the part of code, though I can use getclobval() directly into query) to convert XML store into TEXT_TABLE
CREATE OR REPLACE FUNCTION getvalue_clob_post(p_xmldata XMLtype)
RETURN clob IS
v_xmldata XMLtype;
BEGIN
v_xmldata:=p_xmldata;
RETURN v_xmldata.getClobVal();
EXCEPTION WHEN OTHERS THEN
raise_application_error (-20102, 'Exception occurred in getAccountsHTML :'||SQLERRM);
END getvalue_clob_post;
/
My problem is that I dont want to use getClobVal() becuase it is not working for the tags which contains very large text or different character set.
Does any one has any idea how I can convert data(XML files) stored into XMLtype column into CLOB without using getClobVal() function?
thanks in advance