abstract class NodeLocator

Methods

static DOMNode[]
getAttributesByRegexp(DOMDocument $dom, string $regexp)

Return all attributes (literal or generated) that match given regexp

static DOMNode[]
getCSSNodes(DOMDocument $dom)

Return all DOMNodes whose content is CSS

static DOMNode[]
getElementsByRegexp(DOMDocument $dom, string $regexp)

Return all elements (literal or generated) that match given regexp

static DOMNode[]
getJSNodes(DOMDocument $dom)

Return all DOMNodes whose content is JavaScript

static DOMNode[]
getObjectParamsByRegexp(DOMDocument $dom, string $regexp)

Return all elements (literal or generated) that match given regexp

static DOMNode[]
getURLNodes(DOMDocument $dom)

Return all DOMNodes whose content is an URL

static DOMNode[]
getNodes(DOMDocument $dom, string $type)

Return all nodes of given type

static DOMNode[]
getNodesByRegexp(DOMDocument $dom, string $regexp, string $type)

Return all nodes (literal or generated) that match given regexp

Details

at line 22
static DOMNode[] getAttributesByRegexp(DOMDocument $dom, string $regexp)

Return all attributes (literal or generated) that match given regexp

Parameters

DOMDocument $dom Document
string $regexp Regexp

Return Value

DOMNode[]

List of DOMNode instances

at line 33
static DOMNode[] getCSSNodes(DOMDocument $dom)

Return all DOMNodes whose content is CSS

Parameters

DOMDocument $dom Document

Return Value

DOMNode[]

List of DOMNode instances

at line 51
static DOMNode[] getElementsByRegexp(DOMDocument $dom, string $regexp)

Return all elements (literal or generated) that match given regexp

Parameters

DOMDocument $dom Document
string $regexp Regexp

Return Value

DOMNode[]

List of DOMNode instances

at line 62
static DOMNode[] getJSNodes(DOMDocument $dom)

Return all DOMNodes whose content is JavaScript

Parameters

DOMDocument $dom Document

Return Value

DOMNode[]

List of DOMNode instances

at line 84
static DOMNode[] getObjectParamsByRegexp(DOMDocument $dom, string $regexp)

Return all elements (literal or generated) that match given regexp

Will return all descendants of and all attributes of whose name matches given regexp. This method will NOT catch elements whose 'name' attribute is set via an

Parameters

DOMDocument $dom Document
string $regexp

Return Value

DOMNode[]

List of DOMNode instances

at line 126
static DOMNode[] getURLNodes(DOMDocument $dom)

Return all DOMNodes whose content is an URL

NOTE: it will also return HTML4 nodes whose content is an URI

Parameters

DOMDocument $dom Document

Return Value

DOMNode[]

List of DOMNode instances

at line 154
static protected DOMNode[] getNodes(DOMDocument $dom, string $type)

Return all nodes of given type

Parameters

DOMDocument $dom

Owner document

string $type

Node type ('element' or 'attribute')

Return Value

DOMNode[]

List of DOMNode instances

at line 192
static protected DOMNode[] getNodesByRegexp(DOMDocument $dom, string $regexp, string $type)

Return all nodes (literal or generated) that match given regexp

Parameters

DOMDocument $dom

Owner document

string $regexp Regexp
string $type

Node type ('element' or 'attribute')

Return Value

DOMNode[]

List of DOMNode instances