set echo on 
spool 1_loadData.log

drop table medline_tmp_tab force
/

drop table medline_tab force
/

CREATE TABLE medline_tmp_tab (citations XMLType)
  XMLType COLUMN citations store as SECUREFILE binary XML
  (compress cache)
;

create or replace directory xmldir as 'c:\HOL\xmldb_5\files'
/

insert into medline_tmp_tab values(xmltype(bfilename('XMLDIR','medline08n0059.xml'), nls_charset_id('WE8MSWIN1252')));

create table medline_tab (citation xmltype)
xmltype column citation store as securefile binary xml
(compress cache)
;

insert into medline_tab select x.column_value from medline_tmp_tab, xmltable('//MedlineCitation' passing citations) x
/
commit
/
spool off
