Importing XML in to phpmyadmin database

被刻印的时光 ゝ 提交于 2020-01-23 10:12:39

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!