Wednesday, 15 September 2010

xml - PHP working with XMLReader with HUGE data source -



xml - PHP working with XMLReader with HUGE data source -

i need parse ginormous info source (14.9m lines of xml, 1.7gb).

i having problems working xmlreader this. haven't before needed simplexml, given can't load whopper memory need via stream.

i have written code:

<?php $xml = new xmlreader(); $xml->open('public.xml'); while($xml->read()) { echo '.'; } $xml->close(); ?>

but having issues execution. namely, "fatal error: maximum execution time of 30 seconds exceeded..."

when set_time_limit(600) browser crashes.

it crashing because can't handle number of "." created?

what recommend here? ultimately, need xml file relational database. testing feasibility before detail of schema.

it crashing because can't handle number of "." created?

to test seek without echo '.';. need lot of ram increment maximal memory script can use. split xml file in smaller parts , process them sequentially.

eventually at:

parsing huge xml files in php best way process big xml in php how utilize php parse big xml file sequentially

php xml xmlreader

No comments:

Post a Comment