开发者

How to parse XML in PHP, generating dynamic SQL insert statements

开发者 https://www.devze.com 2023-02-03 23:49 出处:网络
I\'m attempting to parse an XML file, and generate & insert the element data into a mysql database. Any pointe开发者_JAVA百科rs?

I'm attempting to parse an XML file, and generate & insert the element data into a mysql database. Any pointe开发者_JAVA百科rs? The xml document in this case is deep nested and element data contained goes into one table.


You can start with using a SimpleXML object (really easy).

Here's the documentation: http://php.net/manual/en/book.simplexml.php

Here's a tutorial: http://www.willfitch.com/simplexml-tutorial-part1.html.

0

精彩评论

暂无评论...
验证码 换一张
取 消