Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

I have an XML files to read and load into database daily at night (cron) So i planed to do this in a batch. Is there any command line tool to :
1. Create a postgres schema using an XSD file?
2. Transform an XML file into SQL commands for postgres?

Any other solution is welcome.

share|improve this question
    
Better as this question in [dba][1] also [1]: dba.stackexchange.com –  Slyx May 28 '14 at 19:32

1 Answer 1

up vote 1 down vote accepted

You can generate SQL commands to import your file using xmlstarlet.

Here is an example.

share|improve this answer
1  
I see. The example is for MYSQL but i can do the same for postgres. What about the schema creation? –  Nadina May 28 '14 at 19:41

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.