This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
symfony/src/Symfony/Component/CssSelector
Fabien Potencier d2885adffe Merge branch '2.0' into 2.1
* 2.0:
  fixed CS
  removed the Travis icon (as this is not stable enough -- many false positive, closes #6186)
  [Config] Loader::import must return imported data
  [HttpFoundation] fixed a small regression

Conflicts:
	README.md
	src/Symfony/Bridge/Twig/Extension/FormExtension.php
	src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/attributes.html.php
	src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/form_widget.html.php
	src/Symfony/Bundle/FrameworkBundle/Templating/Helper/FormHelper.php
	src/Symfony/Component/Form/Form.php
	src/Symfony/Component/HttpFoundation/Request.php
	src/Symfony/Component/HttpFoundation/SessionStorage/PdoSessionStorage.php
	tests/Symfony/Tests/Bridge/Doctrine/Logger/DbalLoggerTest.php
2012-12-11 11:33:11 +01:00
..
Exception [CssSelector] renamed SyntaxError 2011-06-14 14:12:03 +02:00
Node fixed CS 2012-12-11 11:27:06 +01:00
Tests merged 2.0 2012-05-15 18:49:53 +02:00
.gitattributes Fix export-ignore on Windows 2012-11-08 10:51:48 +01:00
CHANGELOG.md [CssSelector] added CHANGELOG 2012-04-26 22:11:05 +02:00
composer.json Removed useless branch alias for dev-master in composer.json 2012-12-06 11:00:55 +01:00
CssSelector.php fixed CS 2012-07-09 14:54:20 +02:00
LICENSE Updated LICENSE files copyright 2012-02-22 10:10:37 +01:00
phpunit.xml.dist [Components] Tests/Autoloading fixes 2012-05-01 17:51:41 +02:00
README.md merged 2.0 2012-05-15 18:49:53 +02:00
Token.php fixed phpdoc @param alignment 2012-05-15 22:19:31 +02:00
Tokenizer.php fixed CS 2012-05-20 18:15:10 +02:00
TokenStream.php [CssSelector] moved protected to private 2011-03-24 08:34:52 +01:00
XPathExpr.php fixed CS 2012-07-09 14:54:20 +02:00
XPathExprOr.php [CssSelector] Fixed Issue for XPathExprOr: missing prefix in string conversion 2011-11-28 22:00:26 +01:00

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