[DomCrawler] Made that default namespace is no longer removed when loading documents with addXmlContent().

This commit is contained in:
Jakub Zalas 2013-09-17 17:57:11 +01:00
parent c905bba6a0
commit 587e2dd44f

View File

@ -195,9 +195,7 @@ class Crawler extends \SplObjectStorage
$dom = new \DOMDocument('1.0', $charset);
$dom->validateOnParse = true;
// remove the default namespace to make XPath expressions simpler
@$dom->loadXML(str_replace('xmlns=', 'ns=', $content), LIBXML_NONET);
@$dom->loadXML($content, LIBXML_NONET);
libxml_use_internal_errors($current);
libxml_disable_entity_loader($disableEntities);