diff --git a/components/css_selector.rst b/components/css_selector.rst index 3935f3c85ee..8d5f0d658b5 100644 --- a/components/css_selector.rst +++ b/components/css_selector.rst @@ -47,11 +47,14 @@ The CssSelector Component ~~~~~~~~~~~~~~~~~~~~~~~~~ The component's only goal is to convert CSS selectors to their XPath -equivalents:: +equivalents, using :method:`Converter::toXPath() ` - use Symfony\Component\CssSelector\CssSelector; +.. code-block:: php - var_dump(CssSelector::toXPath('div.item > h4 > a')); + use Symfony\Component\CssSelector\Converter; + + $converter = new Converter(); + var_dump($converter->toXPath('div.item > h4 > a')); This gives the following output: