Convert xml file to a database table...any hints

atreides

Graduate Student
Joined
7/4/08
Messages
420
Points
38
I'm trying to convert an xml file to a mysql database table, but for some reason I'm running into roadblocks

I've poured over online documentations / blogs but haven't been able to figure it. Any hints will be appreciated .

I am on an ubuntu box 10.04, with mysql 5.1.41
 
I'm trying to convert an xml file to a mysql database table, but for some reason I'm running into roadblocks

I've poured over online documentations / blogs but haven't been able to figure it. Any hints will be appreciated .

I am on an ubuntu box 10.04, with mysql 5.1.41
So, I don't know what native support MySQL has for XML, but a quick "googling" came up with a MySQL function called ExtractValue. This could be useful if you want to do the processing inside MySQL (I don't take into account previous discussions about having business logic inside the db engine :) ). Look at this link for more:
http://dev.mysql.com/tech-resources/articles/xml-in-mysql5.1-6.0.html#xml-5.1-importing

Another way is to parse the xml data in an application outside of MySQL and then just call insert statements.

You are saying you are running into road-blocks, what problems do you encounter?

Niels
 
Back
Top Bottom