Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
[READ-ONLY] Subtree split of the Symfony CssSelector Component -- clone into Symfony/Component/ (master at symfony/symfony)

Fetching latest commit…

Cannot retrieve the latest commit at this time

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

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

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

You can run the unit tests with the following command:

phpunit
Something went wrong with that request. Please try again.