如何可用将这样格式的XML读成一行一行的数据存到数据库里?
<msg time='2014-10-22T22:00:32.924+08:00' org_id='oracle' comp_id='rdbms'
client_id='' type='UNKNOWN' level='16'
host_id='dataserver12' host_addr='172.16.10.12' module=''
pid='31366' version='1'>
<txt>Thread 1 cannot allocate new log, sequence 377
</txt>
</msg>
<msg time='2014-10-22T22:00:32.924+08:00' org_id='oracle' comp_id='rdbms'
client_id='' type='UNKNOWN' level='16'
host_id='dataserver12' host_addr='172.16.10.12' module=''
pid='31366'>
<txt>Private strand flush not complete
</txt>
</msg>
<msg time='2014-10-22T22:00:32.924+08:00' org_id='oracle' comp_id='rdbms'
client_id='' type='UNKNOWN' level='16'
host_id='dataserver12' host_addr='172.16.10.12' module=''
pid='31366'>
<txt> Current log# 1 seq# 376 mem# 0: /home/oracle/app/oracle/oradata/orcl/redo01.log
</txt>
</msg>
<msg time='2014-10-22T22:00:36.055+08:00' org_id='oracle' comp_id='rdbms'
client_id='' type='UNKNOWN' level='16'
host_id='dataserver12' host_addr='172.16.10.12' module=''
pid='31366'>
<txt>Thread 1 advanced to log sequence 377 (LGWR switch)
</txt>
</msg>
<msg time='2014-10-22T22:00:36.055+08:00' org_id='oracle' comp_id='rdbms'
client_id='' type='UNKNOWN' level='16'
host_id='dataserver12' host_addr='172.16.10.12' module=''
pid='31366'>
<txt> Current log# 2 seq# 377 mem# 0: /home/oracle/app/oracle/oradata/orcl/redo02.log
</txt>
</msg>
<msg time='2014-10-22T22:00:36.522+08:00' org_id='oracle' comp_id='rdbms'
client_id='' type='UNKNOWN' level='16'
host_id='dataserver12' host_addr='172.16.10.12' module=''
pid='31491'>
<txt>Archived Log entry 340 added for thread 1 sequence 376 ID 0x5273f832 dest 1:
</txt>
</msg>
<msg time='2014-10-22T22:01:40.474+08:00' org_id='oracle' comp_id='rdbms'
client_id='' type='UNKNOWN' level='16'
host_id='dataserver12' host_addr='172.16.10.12' module=''
pid='31507'>
<txt>LNS: Standby redo logfile selected for thread 1 sequence 377 for destination LOG_ARCHIVE_DEST_2
</txt>
</msg>
能读到 time的值和标签对 <txt>中的内容就够了</txt>
存放到tb_alert(occur_time date,message varchar2(200))就可以了。
或者有什么简单的办法可以把xml数据展示为多行数据,
一个<msg></msg>中的内容对为一行。