Skip to content

Commit baec6de

Browse files
jakzalweaverryan
authored andcommitted
Added a note about removing the default namespace.
1 parent 68fa18e commit baec6de

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

components/dom_crawler.rst

+3
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,9 @@ and :method:`Symfony\\Component\\DomCrawler\\Crawler::filter`::
138138
changed with the
139139
:method:`Symfony\\Component\\DomCrawler\\Crawler::setDefaultNamespacePrefix`.
140140

141+
The default namespace is removed when loading the content if it's the only
142+
namespace in the document. It's done to simplify the xpath queries.
143+
141144
Namespaces can be explicitly registered with the
142145
:method:`Symfony\\Component\\DomCrawler\\Crawler::registerNamespace`::
143146

0 commit comments

Comments
 (0)