|
Posted by Tom on 05/25/07 17:38
"CK" <nospams@nospams.com> wrote in message
news:oEC5i.24262$gk7.118002@wagner.videotron.net...
> Roy Kaldung wrote:
>
> > CK wrote:
> >> Hello Folks,
> >> My environment is : FreeBSD 6 , apache 1.3.7 and PHP5
> >> I want to parse a big XML file (39MB) . In my php.ini I set
memory_limit
> >> to 64M but I still have a error message followed :
> >> Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to
> >> allocate 57 bytes) ...
> >>
> >> Your helps would be appreciated .
> >> Thanks
> >
> > Hi,
> >
> > try to parse your XML with an SAX Parser
> > instead a DOM parser (-> )if possible. A Dom parser builds a complete
> > tree of the XML file in memory, a SAX parser is 'event driven'. For
> > event driven parsing see http://www.php.net/manual/en/ref.xml.php
> >
> > hth,
> > Roy
>
> Thank you . I tried some examples from
> http://www.php.net/manual/en/ref.xml.php but my XML file is really too
> big . Do you know is some free XML parser out there on the net can display
> the structure of XML file ? I visit MagicParser.com but we have to buy.
>
If you can't find anything for PHP, you might check the Perl CPAN site to
see if someone might already have a module you could use. Depending what you
needed maybe "XML" or "XML::Simple".
Since you're running FreeBSD, it might be worth chekcing ports too.
Tom
--
Basic Accounts $5.95 / mo. or $39.95 / yr.
http://newsguy.com/overview.htm
Navigation:
[Reply to this message]
|