Skip to content

Commit e750fff

Browse files
javiereguiluzfabpot
authored andcommitted
Updated all the README files
1 parent 39e0efb commit e750fff

File tree

1 file changed

+10
-37
lines changed

1 file changed

+10
-37
lines changed

README.md

+10-37
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,20 @@
11
CssSelector Component
22
=====================
33

4-
CssSelector converts CSS selectors to XPath expressions.
5-
6-
The component only goal is to convert CSS selectors to their XPath
7-
equivalents:
8-
9-
```php
10-
use Symfony\Component\CssSelector\CssSelector;
11-
12-
print CssSelector::toXPath('div.item > h4 > a');
13-
```
14-
15-
HTML and XML are different
16-
--------------------------
17-
18-
The `CssSelector` component comes with an `HTML` extension which is enabled by
19-
default. If you need to use this component with `XML` documents, you have to
20-
disable this `HTML` extension. That's because, `HTML` tag & attribute names
21-
are always lower-cased, but case-sensitive in `XML`:
22-
23-
```php
24-
// disable `HTML` extension:
25-
CssSelector::disableHtmlExtension();
26-
27-
// re-enable `HTML` extension:
28-
CssSelector::enableHtmlExtension();
29-
```
30-
31-
When the `HTML` extension is enabled, tag names are lower-cased, attribute
32-
names are lower-cased, the following extra pseudo-classes are supported:
33-
`checked`, `link`, `disabled`, `enabled`, `selected`, `invalid`, `hover`,
34-
`visited`, and the `lang()` function is also added.
4+
The CssSelector component converts CSS selectors to XPath expressions.
355

366
Resources
377
---------
388

9+
* [Documentation](https://symfony.com/doc/current/components/css_selector.html)
10+
* [Contributing](https://symfony.com/doc/current/contributing/index.html)
11+
* [Report issues](https://github.com/symfony/symfony/issues) and
12+
[send Pull Requests](https://github.com/symfony/symfony/pulls)
13+
in the [main Symfony repository](https://github.com/symfony/symfony)
14+
15+
Credits
16+
-------
17+
3918
This component is a port of the Python cssselect library
4019
[v0.7.1](https://github.com/SimonSapin/cssselect/releases/tag/v0.7.1),
4120
which is distributed under the BSD license.
42-
43-
You can run the unit tests with the following command:
44-
45-
$ cd path/to/Symfony/Component/CssSelector/
46-
$ composer install
47-
$ phpunit

0 commit comments

Comments
 (0)