Page 1 of 1

How to parse big XMLs!!!

Posted: Tue Apr 08, 2008 2:57 am
by sherrylady
Hi all!!!
I'm developing an application in PHP and in one module I have to parse some XML files and show them in the page, the problem is some of these XML files are big!!! so Its take time to load the page!!! and this application goin to have at least 10 visitors per second, so it will be a problem for me!!! what should I do to reduce the loading time, for example is it better to parse the XML in java script then send it to PHP?
Thanks
Sherry

Re: How to parse big XMLs!!!

Posted: Tue Apr 08, 2008 3:39 am
by arjan.top
XMLReader

Re: How to parse big XMLs!!!

Posted: Tue Apr 08, 2008 3:43 am
by sherrylady
Thanks for your reply, you mean only XMLReader class is enough?

Re: How to parse big XMLs!!!

Posted: Tue Apr 08, 2008 9:42 am
by pickle
How often is this XML file going to be changed? If you're having 10 visitors a second access a file that changes hourly, it could be useful to have either a) just the first visitor parse it & store the result of parsing it in a PHP file for the others to include or b) (preferably) have a cron job parse it.

Of course, this may not be practical depending on what data is in the XML file.

Re: How to parse big XMLs!!!

Posted: Wed Apr 09, 2008 1:30 am
by sherrylady
Hi, Thanks for your reply
Actually I cant use cron job because for example they are not going to update in every 10 min, it depends on the operator to enter the new data in the main database and then that Data base send me the resualt in different XMLs 8O
so whats you suggestion!

Re: How to parse big XMLs!!!

Posted: Wed Apr 09, 2008 9:51 am
by pickle
Have the XML parsed when it's sent to you once, rather than re-parsing it over & over & over.

Re: How to parse big XMLs!!!

Posted: Mon Apr 14, 2008 2:28 am
by sherrylady
Really thanks and sorry for late reply :)