DomQuery
class DomQuery extends SimpleXMLElement
DomQuery simplifies querying (X)HTML documents.
Methods
array
find(string $selector)
Finds descendants of current element that match the given CSS selector.
bool
has(string $selector)
Checks if any descendant of current element matches the given selector.
bool
matches(string $selector)
Determines if the current element matches the specified CSS selector.
static string
css2xpath(string $css)
Converts a CSS selector into an XPath expression.
Details
at line 21
static DomQuery
fromHtml(string $html)
Creates a DomQuery object from an HTML string.
at line 57
static DomQuery
fromXml(string $xml)
Creates a DomQuery object from an XML string.
at line 67
array
find(string $selector)
Finds descendants of current element that match the given CSS selector.
at line 77
bool
has(string $selector)
Checks if any descendant of current element matches the given selector.
at line 86
bool
matches(string $selector)
Determines if the current element matches the specified CSS selector.
at line 95
static string
css2xpath(string $css)
Converts a CSS selector into an XPath expression.