I don't know if anyone can help me with this. But can anyone tell me how can I map an XML script into mysql database? Lets say the web service provider has a XML script that returns the hotel classifications. Instead of running this script everytime I run a search query, I want it to save into the database and use the database table instead of the XML script. Can anyone help me with this?
Asked
Active
Viewed 1,092 times
1
-
XML code... I don't know if you understand what I'm saying – Fady Sawan Aug 30 '11 at 12:58
-
What is XML code? Do you just mean an XML document? I've never heard of an XML script or XML code. – John Saunders Aug 30 '11 at 13:19
-
ok lets say XML document – Fady Sawan Aug 30 '11 at 13:21
-
Good luck, but remember, just because you're using PHP doesn't mean that everything is a script. – John Saunders Aug 30 '11 at 13:32
2 Answers
0
You shouldn't work with XML from a webservice directly. Use a proxy class which automatically serialize and desearialize the XML for you into a "Hotel" object.

joshgo
- 1,164
- 1
- 9
- 14
-
Well can you tell me this in a simpler way? I'm still a noob in using XML. I'm using PHP by the way – Fady Sawan Aug 30 '11 at 13:02
-
Not too familiar with PHP, but you can start looking at this: http://pear.php.net/package/XML_Serializer – joshgo Aug 30 '11 at 13:08