i was wondering how i can convert my fetch data from database into XML..!!
actually i want to use idea on pagination..!!

when first time user search for data...!! a XML file will creating containing data from database..!! and further data will be listed from XML instead of database..!!!

can anyone help..?

8 Years
Discussion Span
Last Post by diafol

Yep, I can help...

I need to know the db fields & where/what you want to use! How you wan't it displayed etc...

are you trying to output rss feeds or what?


thanks for response..!!

i just want to listing the data on a webpage..!!
i have a db field country_name and country_id..!! there are 150 records in a table..!!

So i try to use pagination at front end..!!! but every time i click on paging number... it fetch data from database..!! so instead of contacting database everytime.. i thought why not to load data into temporay XML file on page load and than fetch data from XML file instead of database..!! i think will make application more fast.!!!

what u say.??

Edited by sam023: n/a


Opening and reading files is slower that connecting to and reading from a db. Well, as far as I know.


ohhh i thought using XML will make my application fast..!!! still i want to know how to convert db data into xml through php..!!

does anyone know this.?


i think this concept is works for pagination.. where each time connection is made and than data is fetch..!!

data fetch once and store in xml file..!! than data is fetch from loaded xml file.. that will surely fast your application in during paging..!!


For small amounts of data, perhaps there would be negligible differences in speed, but as your data grows, a db would certainly be quicker - especially if correctly indexed.

The xml file, when opened will need to be read. The bigger the file, the more 'read time', regardless of how much of the actual info you want to extract.

I understand your point about making small temporary xml files, but I don't think it's worth all that extra hassle. Your db, if properly structured/indexed show be lightning fast.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.