class DomQuery extends SimpleXMLElement

DomQuery simplifies querying (X)HTML documents.

Methods

static DomQuery
fromHtml(string $html)

No description

static DomQuery
fromXml(string $xml)

No description

array
find(string $selector)

Returns array of descendants filtered by a selector.

bool
has(string $selector)

Check the current document against a selector.

static string
css2xpath(string $css)

Transforms CSS expression to XPath.

Details

at line 18
static DomQuery fromHtml(string $html)

No description

Parameters

string $html

Return Value

DomQuery

at line 51
static DomQuery fromXml(string $xml)

No description

Parameters

string $xml

Return Value

DomQuery

at line 61
array find(string $selector)

Returns array of descendants filtered by a selector.

Parameters

string $selector

Return Value

array

at line 70
bool has(string $selector)

Check the current document against a selector.

Parameters

string $selector

Return Value

bool

at line 79
static string css2xpath(string $css)

Transforms CSS expression to XPath.

Parameters

string $css

Return Value

string