[DomCrawler] Made sure only the default namespace is removed when loading an XML content.

This commit is contained in:
Jakub Zalas 2013-04-25 16:20:17 +01:00
parent e5b8abb564
commit 6e717a3092

View File

@ -197,7 +197,7 @@ class Crawler extends \SplObjectStorage
$dom->validateOnParse = true;
// 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);
libxml_use_internal_errors($current);
libxml_disable_entity_loader($disableEntities);