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
2012-03-30 13:49:28 +02:00
..
Exception [CssSelector] renamed SyntaxError 2011-06-14 14:12:03 +02:00
Node [DoctrineBridge] fixed some CS 2011-12-13 10:22:12 +01:00
Tests moved component and bridge unit tests to the src/ directory 2012-03-29 08:37:22 +02:00
composer.json Removed version field 2012-02-27 09:59:20 +01:00
CssSelector.php [CssSelector] fixed CssSelector::toXPath() when the CSS selector is an empty string 2012-03-11 10:18:25 +01:00
LICENSE Updated LICENSE files copyright 2012-02-22 10:10:37 +01:00
phpunit.xml.dist [PhpUnit] Fix the path to the boostrap files in the components 2012-03-30 13:49:28 +02:00
README.md moved component and bridge unit tests to the src/ directory 2012-03-29 08:37:22 +02:00
Token.php [CssSelector] moved protected to private 2011-03-24 08:34:52 +01:00
Tokenizer.php [CssSelector] fixed exception namespace 2011-06-29 19:11:00 +02:00
TokenStream.php [CssSelector] moved protected to private 2011-03-24 08:34:52 +01:00
XPathExpr.php [CssSelector] moved protected to private 2011-03-24 08:34:52 +01: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 http://codespeak.net/svn/lxml/trunk/src/lxml/cssselect.py@71545

You can run the unit tests with the following command:

phpunit -c src/Symfony/Component/CssSelector/