• C++ Programming for Financial Engineering
    Highly recommended by thousands of MFE students. Covers essential C++ topics with applications to financial engineering. Learn more Join!
    Python for Finance with Intro to Data Science
    Gain practical understanding of Python to read, understand, and write professional Python code for your first day on the job. Learn more Join!
    An Intuition-Based Options Primer for FE
    Ideal for entry level positions interviews and graduate studies, specializing in options trading arbitrage and options valuation models. Learn more Join!

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

atreides

Graduate Student
Joined
7/4/08
Messages
421
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