|
Posted by Cristian Cotovan on 08/10/07 18:23
On Aug 10, 2:34 am, "Bob Bedford" <b...@bedford.com> wrote:
> > $xml = simplexml_load_file($xmlFile);
> > And take it from there. Have a quick read of the simplexml docs. You
> > should
> > have your solution in very little time.
>
> Thanks for replying....
> after a quick search, I've to say I'm still in PHP 4 !!! damn !!!
If you have files that big, simple xml is not an option, because the
memory will run out, and simple xml reads the whole file in memory and
makes a copy of it. What you really want is xml parsing in "streaming"
or "pull parsing" mode. You can read about it here:
http://www.ibm.com/developerworks/xml/library/x-pullparsingphp.html?ca=dgr-lnxw06XMLReader
However, I guess this is also not very helpful since you're running
PHP 4 and XMLReader has been introduced in PHP5. I am fighting this at
this moment also (with no solution yet), as I have to parse huge ONIX
files from book publishers (some are 90 Mb!). Let me know if you get
lucky.
Navigation:
[Reply to this message]
|