Skip to content
This repository


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

Octocat-spinner-32 Exception
Octocat-spinner-32 Node
Octocat-spinner-32 CssSelector.php
Octocat-spinner-32 LICENSE
Octocat-spinner-32 Token.php
Octocat-spinner-32 TokenStream.php
Octocat-spinner-32 Tokenizer.php
Octocat-spinner-32 XPathExpr.php
Octocat-spinner-32 XPathExprOr.php
Octocat-spinner-32 composer.json

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');


Unit tests:

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

Something went wrong with that request. Please try again.