Skip to content

Commit

Permalink
Able to load big xml files with DomCrawler
Browse files Browse the repository at this point in the history
  • Loading branch information
zorn authored and fabpot committed Jan 25, 2016
1 parent 898f389 commit 3dae825
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Symfony/Component/DomCrawler/Crawler.php
Expand Up @@ -230,7 +230,7 @@ public function addXmlContent($content, $charset = 'UTF-8')

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);
Expand Down

0 comments on commit 3dae825

Please sign in to comment.