Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using XML and XSD to create a populated database

I'm not sure if this is possible, but figured I'd ask and see if I can get any info.

As the title suggests, I have an XML file with thousands of lines. I also have its associated XSD schema file.

I was wondering, is it possible for me to convert this data into a MySQL database without manually specifying the XPath stuff?

For example, is it possible for a Java or Python or whatever program to analyse the XML structure, based on the XSD, extract the table columns, and populate it with data?

I tried using PHPMyAdmin to import my XML file, but it didn't work and said there was a problem, which I think was related to the fact that it couldn't create the columns. As far as I know, it can handle CSV files better, so that's another option for a 2 stage conversion.

Thanks.

like image 392
eoinzy Avatar asked Oct 07 '22 05:10

eoinzy


1 Answers

Try XMLPipeDB for building relational databases from XSD files.

like image 174
Melroy van den Berg Avatar answered Oct 13 '22 09:10

Melroy van den Berg