Home Importing an xml schema into postgres to automatically create a table and then populate it with an xml file?
 I have a huge xml file that I cannot open unless I import it into a database. I am using Postgres for this. I have a schema that goes with this data file. There are too many columns so i'd like to automate the process of creating a table from this schema and then importing the data file from the local drive on my computer to populate this table. How do i do this? I saw a lot of answers on SO but haven't been able to understand this correctly. Also I do not have superuser rights so will have to work around that. Here's what the schema file looks like: > xmlns:xs="http://www.w3.org/2001/XMLSchema" > elementFormDefault="qualified" > targetNamespace="http://www.drugbank.ca" xmlns="http://www.drugbank.ca"> > > > This is the root element for the DrugBank database schema. DrugBank is a database on drug and > drug-targets. > > > > > This is the root element type for the DrugBank database schema. > > > > > > > The DrugBank version for the exported XML file. > > > > > The date the XML file was exported. > > > > > > type="drugbank-drug-salt-id-type"> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >  This is only a part of it. It's a huge file. Any kind of help/guidance is much appreciated.