Able to load big xml files with DomCrawler

This commit is contained in:
zorn 2015-12-07 13:23:40 +10:00 committed by Fabien Potencier
parent 898f3890ff
commit 3dae8257f2
1 changed files with 1 additions and 1 deletions

View File

@ -230,7 +230,7 @@ class Crawler extends \SplObjectStorage
if ('' !== trim($content)) {
// remove the default namespace to make XPath expressions simpler
@$dom->loadXML(str_replace('xmlns', 'ns', $content), LIBXML_NONET);
@$dom->loadXML(str_replace('xmlns', 'ns', $content), LIBXML_NONET | (defined('LIBXML_PARSEHUGE') ? LIBXML_PARSEHUGE : 0));
}
libxml_use_internal_errors($internalErrors);