Hello! I am a newbie and have a question (thanks in advance)!
What I am trying to accopmlish is to somehow store XML data into MySQL (using PHP I'm guessing). Can anyone point me in the right direction to get started? Thanks!
Lance
Hello! I am a newbie and have a question (thanks in advance)!
What I am trying to accopmlish is to somehow store XML data into MySQL (using PHP I'm guessing). Can anyone point me in the right direction to get started? Thanks!
Lance
Do you simply want to store the raw XML text in a single database field, or do you want to parse the XML into discrete rows and columns of data within a database table (or maybe more than one table)?
The second option, multiples fields of data. Thanks so far Nogdog!
You're probably looking at either using the [man]simpleXML[/man] functions if running PHP 5, or the [man]DOM_XML[/man] functions if using PHP 4. They will allow you to build a structured object from the XML file, and then you can loop through it to extract the desired data and insert it into the database.
Thanks so far Nogdog! A couple more questions.
1) Is there a real life example I can find of this being used that you know of?
2) Is this the best thing to do if I will be uploading the XML into the database on a regular basis (possibly even daily)?
Thanks!