eoinzy
eoinzy

Reputation: 2242

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.

Upvotes: 5

Views: 17471

Answers (2)

Melroy van den Berg
Melroy van den Berg

Reputation: 3166

Try XMLPipeDB for building relational databases from XSD files.

Upvotes: 3

Paul Sweatte
Paul Sweatte

Reputation: 24617

Use XMLImport to load the XML with XSD into Excel, save as CSV or format into the desired XML format such as Wordpress, then import into MySQL.

Upvotes: 1

Related Questions