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