tidyNode
final class tidyNode (View source)
An HTML node in an HTML file, as detected by tidy.
Properties
string | $value | The HTML representation of the node, including the surrounding tags. |
|
string | $name | The name of the HTML node |
|
int | $type | The type of the tag (one of the constants above, e.g. ```TIDY_NODETYPE_PHP```) |
|
int | $line | The line number at which the tags is located in the file |
|
int | $column | The column number at which the tags is located in the file |
|
bool | $proprietary | Indicates if the node is a proprietary tag |
|
int|null | $id | The ID of the tag (one of the constants above, e.g. ```TIDY_TAG_FRAME```) |
|
array|null | $attribute | An array of string, representing the attributes names (as keys) of the current node. |
|
array|null | $child | An array of tidyNode, representing the children of the current node. |
Methods
Checks if a node has children
Checks if a node has siblings
Checks if a node represents a comment
Checks if a node is part of a HTML document
Checks if a node represents text (no markup)
Checks if this node is JSTE
Checks if this node is ASP
Checks if a node is PHP
Details
bool
hasChildren()
Checks if a node has children
bool
hasSiblings()
Checks if a node has siblings
bool
isComment()
Checks if a node represents a comment
bool
isHtml()
Checks if a node is part of a HTML document
bool
isText()
Checks if a node represents text (no markup)
bool
isJste()
Checks if this node is JSTE
bool
isAsp()
Checks if this node is ASP
bool
isPhp()
Checks if a node is PHP
tidyNode|null
getParent()
Returns the parent node of the current node