简体   繁体   中英

Extract from DB to XML

I have made a website where users can choose some regions on Google Maps, and save them into a database with a name an a description. What I need now is to be able to take the saved entries from my DB and show them also to an android app I have made with google maps. I am new to all these and from my research I understand that I should extract my data from the DB to an XML file and then parse them on the phone. For doing the first part I should use the following code, if I am not mistaken:

SELECT column1, column2,..
FROM tablename
FOR XML PATH;

What I still dont get is where should I put that piece of code? In a new file? All by itself? And with that code the XML file will be created, or should I do something else too? Thank you

Well since noone answered my question and I did find the solution I'll post it here. The answer is via PHP, XMLWriter. There is a question here that helped but I wasnt able to find from the beginning since I didnt know what to search for.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM