将XML导入到phpmyadmin数据库 [英] Importing XML in to phpmyadmin database
本文介绍了将XML导入到phpmyadmin数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我尝试从此网站导入XML http://data.gov.uk/数据集/停车场到phpmyadmin数据库,所以我可以使用它在一个谷歌地图mashup。
我是新的,不知道如何去获取XML到数据库。首先创建数据库列,然后导入数据?
解决方案
有一个 LOAD XML 方法,通过它可以将XML中的数据导入到数据库中。 / p>
例如:
LOAD XML LOCAL INFILE'/ pathtofile / file .xml'
INTO TABLE`tablename`(fieldl1,field2,...);
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?
解决方案
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, ...);
这篇关于将XML导入到phpmyadmin数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文