Skip to content

Commit

Permalink
minor #6536 [DomCrawler] Removed references to CssSelector (aerialls)
Browse files Browse the repository at this point in the history
This PR was merged into the 2.8 branch.

Discussion
----------

[DomCrawler] Removed references to CssSelector

The CssSelector class does not exists since 2.8. The behavior is now automatic if the content is an XML file.

Commits
-------

50a8777 [DomCrawler] Removed references to CssSelector
  • Loading branch information
xabbuh committed May 9, 2016
2 parents c375b2f + 50a8777 commit c8a76e3
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 c8a76e3

Please sign in to comment.