Postgres将包含多个元素的XML文件导入多个表

时间:2015-11-25 16:29:11

标签: xml database postgresql

有没有人知道如何将以下XML导入到单独的表中。 例如:

<?xml version="1.0" standalone="yes"?>
 <data>
  <customer>
   <id>1</id>
   <name>John</name>
  </customer>
  <customer>
   <id>2</id>
   <name>Smith</name>
  </customer>
   .
   .
   .
  <city>
   <name>London</name>
   <code>LO</code>
  </city>
  <city>
   <name>Paris</name>
   <code>PA</code>
  </city>
   .
   .
   .
 </data>

应导入客户和城市表。

0 个答案:

没有答案