Forum Moderators: coopster

Message Too Old, No Replies

Help with XML into MySQL

Looking for real examples

         

CWebguy

7:41 pm on Sep 7, 2007 (gmt 0)

10+ Year Member



Hello, I am looking for some help with importing XML file into MySQL database (I guess you would call it parsing). The problem is, is that I need to have real life examples to learn from (just the way I'm "programmed" I guess :) . I've searched hard and can't find this. Does anybody know of a site that real life examples to learn from (or any other "Just for Dummies" tutorial?)

Thanks!

eelixduppy

7:44 pm on Sep 7, 2007 (gmt 0)



SimpleXML is very easy to use and there are some very readable examples in the documentation: [us2.php.net...]

Take a look and see where you can get. If you need MySQL help there are some good threads in our library and in the docs: [php.net...]

CWebguy

9:36 pm on Sep 7, 2007 (gmt 0)

10+ Year Member



eelix, thanks so much for your time and help!

I have looked at the doc that you posted. One question (I am kind of new to this and really trying to learn, so please bear with me :)

It looks like the SimpleXML only parses (in my terms "changes") the XML so that it is readable/insertable for the database but doesn't actually insert it into the database (at least in the examples used)? Is this right?

After using SimpleXML, it will change the XML into what I need and then you can send/file it into the database using another command (which I need to look up, I can't remember off the top of my head)?

Sorry for the confusion :) Thanks for the help! Bless you!

eelixduppy

11:36 pm on Sep 7, 2007 (gmt 0)



Yes, simplexml allows you to easily read the xml.

Here's a good thread to get you started with the basics of mysql: [webmasterworld.com...]

CWebguy

11:54 pm on Sep 7, 2007 (gmt 0)

10+ Year Member



Awesome, thanks for the thread eelix! Very easy to understand! Insert, update, delete, and select, I think I'm starting to get it! Thanks buddy! Bless you!

CWebguy

11:55 pm on Sep 7, 2007 (gmt 0)

10+ Year Member



So once SimpleXML parses the info, then you can use one of those commands to insert it into the database. (correct me if wrong) Thanks!

eelixduppy

1:58 am on Sep 8, 2007 (gmt 0)



yup, sounds good :)

CWebguy

4:00 am on Sep 8, 2007 (gmt 0)

10+ Year Member



Awesome, thanks eelix.

phparion

5:03 am on Sep 8, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



there are some ready made softwares , paid and free, that have the feature to import xml to mysql. I myself have used EMS, you might want to have a look at <snip>

[edited by: dreamcatcher at 6:09 am (utc) on Sep. 8, 2007]
[edit reason] no urls as per T.O.S [webmasterworld.com].Thanks [/edit]

CWebguy

1:14 am on Sep 9, 2007 (gmt 0)

10+ Year Member



NO, the snip got it before I could see what you wrote :¦ But thanks anyway!