I have a question. Does anyone have a working php script which can parse a XML file to a sql database? I have searched for some scripts and didn't find anything what looks like I can edit it to my needs.
Any help would be great!
I have a question. Does anyone have a working php script which can parse a XML file to a sql database? I have searched for some scripts and didn't find anything what looks like I can edit it to my needs.
Any help would be great!
Parse the XML using simplexml and extract the data of your interest from the XML file and insert into MySql using functions listed here.
Give it a try. Its not that difficult and you'll learn a lot.
It is not a PHP solution, but you can extract values from XML directly into mySQL:
http://dev.mysql.com/doc/refman/5.1/en/xml-functions.html
Of course, if this is something you will need to do often, you can always fall back to what bzabhi have said.