TranslatorInterface

interface TranslatorInterface

XPath expression translator interface.

This component is a port of the Python cssselect library, which is copyright Ian Bicking, see https://github.com/SimonSapin/cssselect.

Methods

cssToXPath(string $cssExpr, string $prefix = 'descendant-or-self::')

Translates a CSS selector to an XPath expression.

selectorToXPath(SelectorNode $selector, string $prefix = 'descendant-or-self::')

Translates a parsed selector node to an XPath expression.

Details

cssToXPath(string $cssExpr, string $prefix = 'descendant-or-self::')

Translates a CSS selector to an XPath expression.

Parameters

string $cssExpr
string $prefix

selectorToXPath(SelectorNode $selector, string $prefix = 'descendant-or-self::')

Translates a parsed selector node to an XPath expression.

Parameters

SelectorNode $selector
string $prefix

© 2004–2017 Fabien Potencier
Licensed under the MIT License.
http://api.symfony.com/4.0/Symfony/Component/CssSelector/XPath/TranslatorInterface.html