Skip to content
This repository

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…

Octocat-spinner-32-eaf2f5

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 README.md
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
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.