XML : Postgres import XML file with multiple elements to multiple tables

Does anyone have idea how do i import the following XML into separate tables. For example:

  <?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>    

should be imported into customers and cities tables.

No comments:

Post a Comment