Automattic\WooCommerce\Vendor\Symfony\Component\CssSelector\XPath

TranslatorInterface{}interfaceWC 1.0

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.

No Hooks.

Usage

$TranslatorInterface = new TranslatorInterface();
// use class methods

Methods

  1. public cssToXPath(string $cssExpr, string $prefix = 'descendant-or-self::')
  2. public selectorToXPath(SelectorNode $selector, string $prefix = 'descendant-or-self::')

TranslatorInterface{} code WC 10.4.3

interface TranslatorInterface
{
    /**
     * Translates a CSS selector to an XPath expression.
     */
    public function cssToXPath(string $cssExpr, string $prefix = 'descendant-or-self::'): string;

    /**
     * Translates a parsed selector node to an XPath expression.
     */
    public function selectorToXPath(SelectorNode $selector, string $prefix = 'descendant-or-self::'): string;
}