[DomCrawler] Made that default namespace is no longer removed when loading documents with addXmlContent().
This commit is contained in:
parent
c905bba6a0
commit
587e2dd44f
@ -195,9 +195,7 @@ class Crawler extends \SplObjectStorage
|
|||||||
|
|
||||||
$dom = new \DOMDocument('1.0', $charset);
|
$dom = new \DOMDocument('1.0', $charset);
|
||||||
$dom->validateOnParse = true;
|
$dom->validateOnParse = true;
|
||||||
|
@$dom->loadXML($content, LIBXML_NONET);
|
||||||
// remove the default namespace to make XPath expressions simpler
|
|
||||||
@$dom->loadXML(str_replace('xmlns=', 'ns=', $content), LIBXML_NONET);
|
|
||||||
|
|
||||||
libxml_use_internal_errors($current);
|
libxml_use_internal_errors($current);
|
||||||
libxml_disable_entity_loader($disableEntities);
|
libxml_disable_entity_loader($disableEntities);
|
||||||
|
Reference in New Issue
Block a user