问题
I'm trying to import XML from this site http://data.gov.uk/dataset/car-parks to a phpmyadmin database, so I can use it in a google maps mashup.
I'm new to this and not sure how to go about getting the XML in to the database. Do I create the database columns first and then import the data?
回答1:
There is a LOAD XML method in mysql, through which you can import the data from XML into your database.
An Example:
LOAD XML LOCAL INFILE '/pathtofile/file.xml'
INTO TABLE `tablename` (fieldl1, field2, ...);
来源:https://stackoverflow.com/questions/10163988/importing-xml-in-to-phpmyadmin-database