MySQL Forums :: JavaScript, JSON, Node.js :: importing XML file into MySQL

Advanced Search

Re: importing XML file into MySQL
Posted by: Roland Bouman ()
Date: April 05, 2006 04:51PM

Lev Abramov wrote:

> My question is whether I can import an XML file
> into MySQL directly, or need to further convert it

Yes, sorta. I wrote a bloggie on that:

However, it involves running MySQL 5.1.6 or up (which is beta) and you'll need some programming experience (fair chance you can reuse almost all of my code in the blog entry)

> first (e.g., open it in MS Excel and re-save as
> .csv) before MySQL (aided by PHPmyAdmin) will
> agree to look at it.

This is actually quite a good idea. Csv imports rather nicely using the mysqlimport utility ( or the LOAD DATA syntax ( If you know some other tool that does it for you: go ahead. Regarding the LOAD DATA method, you might want to check out this thread before you start:,38173,38256#msg-38256

> the second question is whether a layman like me
> can do it in a fairly straightforward manner, or
> whether I should outsource this to someone who
> knows something about database conversion.

Well, I think you should be allright when you try the csv approach. Just post back if you have some more questions.

> TIA -
> Lev

Options: ReplyQuote

Subject Written By Posted
importing XML file into MySQL Lev Abramov 04/02/2006 10:01AM
Re: importing XML file into MySQL Roland Bouman 04/05/2006 04:51PM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.