0

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

1 Answer 1

1

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.

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks Steve, what I was actually looking for is a SAX parser. I have implemented the solution using DOM.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.