Processing large XML
What is the optimized method of parsing a large XML file?
Using XMLReader (http://php.net/manual/en/book.xmlreader.php) is the best method AFAIK. Because XMLReader is stream-based pull parser, the memory usage should be much less than loading the XML file.
I’ve tested on a large xml report generation and worked very well.