Skip to content

Commit

Permalink
[DomCrawler] Removed references to CssSelector
Browse files Browse the repository at this point in the history
The CssSelector class does not exists since 2.8. The behavior is now automatic if the content is an XML file.
  • Loading branch information
aerialls committed May 5, 2016
1 parent a50c5a2 commit 50a8777
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions components/dom_crawler.rst
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,6 @@ aliases both with :method:`Symfony\\Component\\DomCrawler\\Crawler::filterXPath`

and :method:`Symfony\\Component\\DomCrawler\\Crawler::filter`::

use Symfony\Component\CssSelector\CssSelector;

CssSelector::disableHtmlExtension();
$crawler = $crawler->filter('default|entry media|group yt|aspectRatio');

.. note::
Expand All @@ -150,12 +147,6 @@ Namespaces can be explicitly registered with the
$crawler->registerNamespace('m', 'http://search.yahoo.com/mrss/');
$crawler = $crawler->filterXPath('//m:group//yt:aspectRatio');

.. caution::

To query XML with a CSS selector, the HTML extension needs to be disabled with
:method:`CssSelector::disableHtmlExtension <Symfony\\Component\\CssSelector\\CssSelector::disableHtmlExtension>`
to avoid converting the selector to lowercase.

Node Traversing
~~~~~~~~~~~~~~~

Expand Down

0 comments on commit 50a8777

Please sign in to comment.