|
Posted by CK on 05/25/07 14:54
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.
Navigation:
[Reply to this message]
|