Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
[READ-ONLY] Subtree split of the Symfony CssSelector Component -- clone into Symfony/Component/ (master at symfony/symfony)
PHP HTML
Pull request Compare This branch is 212 commits behind master.

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
Exception
Node
CssSelector.php
LICENSE
README.md
Token.php
TokenStream.php
Tokenizer.php
XPathExpr.php
XPathExprOr.php
composer.json

README.md

CssSelector Component

CssSelector converts CSS selectors to XPath expressions.

The component only goal is to convert CSS selectors to their XPath equivalents:

use Symfony\Component\CssSelector\CssSelector;

print CssSelector::toXPath('div.item > h4 > a');

Resources

Unit tests:

https://github.com/symfony/symfony/tree/master/tests/Symfony/Tests/Component/CssSelector

This component is a port of the Python lxml library, which is copyright Infrae and distributed under the BSD license.

Current code is a port of https://github.com/SimonSapin/cssselect@fd2e70

Something went wrong with that request. Please try again.