8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f7f9733 commit 9392f80Copy full SHA for 9392f80
components/css_selector.rst
@@ -47,11 +47,14 @@ The CssSelector Component
47
~~~~~~~~~~~~~~~~~~~~~~~~~
48
49
The component's only goal is to convert CSS selectors to their XPath
50
-equivalents::
+equivalents, using :method:`Converter::toXPath() <Symfony\\Component\\CssSelector\\Converter::toXPath>`
51
52
- use Symfony\Component\CssSelector\CssSelector;
+.. code-block:: php
53
54
- var_dump(CssSelector::toXPath('div.item > h4 > a'));
+ use Symfony\Component\CssSelector\Converter;
55
+
56
+ $converter = new Converter();
57
+ var_dump($converter->toXPath('div.item > h4 > a'));
58
59
This gives the following output:
60
0 commit comments