I open a 10MB+ XML file several times in my script in different functions:\[code\]$dom = DOMDocument::load( $file ) or die('couldnt open');\[/code\]1) Is the above the old style of loading a document? \[quote\] I am using PHP 5. Oppening it statically?\[/quote\]2) Do I need to close the loading of the XML file, if possible? \[quote\] I suspect its causing memory problems because I loop through the nodes of the XML file several thousand times and sometimes my script just ends abruptly.\[/quote\]Thanks all for any help