class DomQuery extends SimpleXMLElement

DomQuery simplifies querying (X)HTML documents.

Methods

static DomQuery
fromHtml($html)

No description

static DomQuery
fromXml($xml)

No description

find($selector)

Returns array of descendants filtered by a selector.

bool
has($selector)

Check the current document against a selector.

static string
css2xpath($css)

Transforms CSS expression to XPath.

Details

at line 20
static DomQuery fromHtml($html)

No description

Parameters

$html

Return Value

DomQuery

at line 49
static DomQuery fromXml($xml)

No description

Parameters

$xml

Return Value

DomQuery

at line 59
DomQuery[] find($selector)

Returns array of descendants filtered by a selector.

Parameters

$selector

Return Value

DomQuery[]

at line 69
bool has($selector)

Check the current document against a selector.

Parameters

$selector

Return Value

bool

at line 79
static string css2xpath($css)

Transforms CSS expression to XPath.

Parameters

$css

Return Value

string