create or replace procedure testxmlinsert(p_xmlstring in clob) as
l_rowcount number(10, 0);
l_hnd := dbms_xmlsave.newcontext('TABLE_NAME');
dbms_xmlsave.setbatchsize(l_hnd, 10000); -- If you don't set this, then you may experience performance problems.... I did
dbms_xmlsave.setdateformat(l_hnd, 'yyyy-MM-dd HH:mm:ss'); -- must be any java date format
-- dbms_xmlsave.setxslt(l_hnd, l_ss_clob); -- set this if you need an XSLT to get the xml into Oracle format
-- dbms_xmlsave.setxsltparam(l_hnd, 'my_param_name', '"my_param_value"'); -- set this if you need XSLT parameters
l_rowcount := dbms_xmlsave.insertxml(l_hnd, l_clob);
If your xml contains no rows, you will get an exception.
There is another package called dbms_xmlstore which is the Oracle recommended package, but I have found that there were one or two little bugs hiding in the xmlstore package. For instance, having a single quote in your data could cause the package to crash or in the difference between <tag></tag> and <tag/>. Maybe it's fixed, maybe I was smoking something. I just remember I decided to stick with dbms_xmlsave.
Oh yes, with dbms_xmlstore, you cannot set a date format. You have to use an alter session command before to change the system date format. With dbms_xmlsave, you are able to set a date format, however, it needs to be a valid Java date format.