Parsing failed (ORA-31011)
Hi,
Next script doesn't work. I think the value of the l_clob is not okay.
declare
l_bfile BFILE;
l_clob CLOB;
l_parser dbms_xmlparser.Parser;
l_doc dbms_xmldom.DOMDocument;
BEGIN
l_bfile := BFileName('BUDGET_DIR', 'test30.xml');
dbms_lob.createtemporary(l_clob, cache=>FALSE);
dbms_lob.open(l_bfile, dbms_lob.lob_readonly);
dbms_lob.loadFromFile(dest_lob => l_clob,
src_lob => l_bfile,
amount => dbms_lob.getLength(l_bfile));
dbms_lob.close(l_bfile);
--
-- Create a parser.
l_parser := dbms_xmlparser.newParser;
--
-- Parse the document and create a new DOM document.
dbms_xmlparser.parseClob(l_parser, l_clob);
end;
Regards, Robbert