XML to database

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
leewad
Forum Commoner
Posts: 91
Joined: Tue May 11, 2004 8:32 am

XML to database

Post by leewad »

Hello

I`m wanting to convert an XML file into a MYSQL file using php, I need a form to upload a xml and it outputs the sql onto the screen, does anyone know where such a script exists?

Cheers
User avatar
Burrito
Spockulator
Posts: 4715
Joined: Wed Feb 04, 2004 8:15 pm
Location: Eden, Utah

Post by Burrito »

assuming the field names on the table are the same as the nodes in the xml file, you could write it very easily.

if you have php 5.0 or greater, take a look at the simpleXML functions.

if you're hell-bent on using an existing script, I'd have a look over at hotscripts.com
Post Reply