bug #16873 Able to load big xml files with DomCrawler (zorn-v)
This PR was submitted for the 2.8 branch but it was merged into the 2.3 branch instead (closes #16873).
Discussion
----------
Able to load big xml files with DomCrawler
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Commits
-------
3dae825
Able to load big xml files with DomCrawler
This commit is contained in:
commit
ec26f6ece0
|
@ -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);
|
||||
|
|
Reference in New Issue