Using XML and XSD to create a populated database

15,892

Solution 1

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.

Solution 2

Try XMLPipeDB for building relational databases from XSD files.

Share:
15,892
eoinzy
Author by

eoinzy

I am a mobile developer from Ireland interested in Android mainly. I learned my trade with C initially, then tried VB6 (which I didn't think too much of), then went on to C++, while briefly touching a few other languages on the side, namely HTML, PHP, MySQL, perl, python, ASP, ASP.NET. I enjoy web programming on occasion, but I am really interested in mobile development. Initially, I learned the basics of iPhone/Ojective-C, but since getting my first Android in 2011, I got into Android development and have really taken a shine to it. I have also written code for Blackberry devices. I don't have any java background so I'm happy to learn java via Android. I enjoy it and think it's fun. As part of a previous college project, I started a blog to keep track of what I have learned. I don't get much visits but it's meant more as a potential addition to my resumé, if I manage to write anything of note!! Please feel free to visit it at www.eoinzy.com and correct my many coding mistakes!

Updated on June 20, 2022

Comments

  • eoinzy
    eoinzy almost 2 years

    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.