Inserting xml data into an XMLTYPE table
From: Schauss, Peter (ESS) <"Schauss,>
Date: Wed, 29 Aug 2012 19:45:48 +0000
Message-ID: <8AE45871F749FC4CBBE053CF2F8A493C0CFB4028_at_XMBVAG74.northgrum.com>
I have an xml file which has the format:
Date: Wed, 29 Aug 2012 19:45:48 +0000
Message-ID: <8AE45871F749FC4CBBE053CF2F8A493C0CFB4028_at_XMBVAG74.northgrum.com>
I have an xml file which has the format:
<XxxsSum>
<xxxSum>
<A>...</A><B>...</B>...
</xxxSum>
<xxxSum>
<A>...</A><B>...</B>...
</xxxSum>
...
</xxxsSum>
I have defined an XML_FILES directory and created a table (create table mytable of xmltype; ).
If I use a statement like
Insert into <mytable> values (xmltype(bfilename('XML_FILES','myfile.xml', nls_charset_id('AL32UTF8')));
it goes in as a single row. How can I load this into a table so that each of the <xxxSum>...</xxxSum> blocks is in a separate row?
Thanks,
Peter Schauss
-- http://www.freelists.org/webpage/oracle-lReceived on Wed Aug 29 2012 - 14:45:48 CDT