开发者

XML mapping to Database

开发者 https://www.devze.com 2023-04-01 06:55 出处:网络
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 classif

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 开发者_StackOverflow社区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?


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.


Put your XMl into a SimpleXMLElement object. You can find an example of how to do that via my answer here.

0

精彩评论

暂无评论...
验证码 换一张
取 消