Свойство | Тип | Описание | |
---|---|---|---|
$dom | DomDocument | ||
$xp | DOMXPath |
Метод | Описание | |
---|---|---|
__construct ( string $html ) | Create a HTMLDoc object | |
__toString ( ) : string | Render this DOM as a string | |
create ( string $html ) : |
Fluent constructor for HTMLDoc objects | |
find ( string $find ) : |
Find elements in the DOM based on CSS selector | |
find_one ( string $find ) : |
Find the first element in the DOM based on a CSS selector | |
get ( ) : string | Return the HTML represented by the DOM | |
query ( string $expression, DomNode $contextnode = null, boolean $registerNodeNS = true ) : |
Pass a query on to the XPath query method |
public __construct ( string $html ) | ||
$html | string | The HTML to parse |
public __toString ( ) : string | ||
Результат | string | the string representation of the DOM |
public query ( string $expression, DomNode $contextnode = null, boolean $registerNodeNS = true ) : |
||
$expression | string | An XPath expression |
$contextnode | DomNode | The context of the query, by default, the root node |
$registerNodeNS | boolean | true by default, false to disable the automatic registration of the context node |
Результат | A list of qualifying nodes |