mediatekformation

CssSelectorConverter
in package

CssSelectorConverter is the main entry point of the component and can convert CSS selectors to XPath expressions.

Tags
author

Christophe Coevoet stof@notk.org

Table of Contents

$translator  : mixed
__construct()  : mixed
toXPath()  : string
Translates a CSS expression to its XPath equivalent.

Properties

Methods

__construct()

public __construct([bool $html = true ]) : mixed
Parameters
$html : bool = true

Whether HTML support should be enabled. Disable it for XML documents

Return values
mixed

toXPath()

Translates a CSS expression to its XPath equivalent.

public toXPath(string $cssExpr[, string $prefix = 'descendant-or-self::' ]) : string

Optionally, a prefix can be added to the resulting XPath expression with the $prefix parameter.

Parameters
$cssExpr : string

The CSS expression

$prefix : string = 'descendant-or-self::'

An optional prefix for the XPath expression

Return values
string

Search results