DOMDocument::load in PHP 5

Posted by Abs on Stack Overflow See other posts from Stack Overflow or by Abs
Published on 2010-01-04T14:27:48Z Indexed on 2010/03/25 12:13 UTC
Read the original article Hit count: 85

Filed under:
|
|
|

Hello all,

I open a 10MB+ XML file several times in my script in different functions:

$dom = DOMDocument::load( $file ) or die('couldnt open');

1) Is the above the old style of loading a document?

I am using PHP 5. Oppening it statically?

2) Do I need to close the loading of the XML file, if possible?

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.

Thanks all for any help

© Stack Overflow or respective owner

Related posts about php

Related posts about Xml