大网数据广告活动
PHP 语言与运行手册

The tidyNode class

· 52CE 我爱测

An HTML node in an HTML file, as detected by tidy.

The tidyNode class

(PHP 5, PHP 7, PHP 8)

Introduction

An HTML node in an HTML file, as detected by tidy.

Class synopsis

final class tidyNode {
/* Properties */
public readonly string $value;
public readonly string $name;
public readonly int $type;
public readonly int $line;
public readonly int $column;
public readonly bool $proprietary;
public readonly ?int $id;
public readonly ?array $attribute;
public readonly ?array $child;
/* Methods */
private function __construct()
public function getNextSibling(): ?tidyNode
public function getParent(): ?tidyNode
public function getPreviousSibling(): ?tidyNode
public function hasChildren(): bool
public function hasSiblings(): bool
public function isAsp(): bool
public function isComment(): bool
public function isHtml(): bool
public function isJste(): bool
public function isPhp(): bool
public function isText(): bool
}

Properties

value

The HTML representation of the node, including the surrounding tags.

name

The name of the HTML node

type

The type of the node (one of the nodetype constants, e.g. TIDY_NODETYPE_PHP)

line

The line number at which the tags is located in the file

column

The column number at which the tags is located in the file

proprietary

Indicates if the node is a proprietary tag

id

The ID of the node (one of the tag constants, e.g. TIDY_TAG_FRAME)

attribute

An array of string, representing the attributes names (as keys) of the current node.

child

An array of tidyNode, representing the children of the current node.

Table of Contents

来源:PHP Documentation Group · 作者与贡献记录 · CC BY 3.0。离线整理了版式、链接和媒体显示。

资料来源与适用范围

资料来源
PHP Documentation Group
适用范围
请按文中版本与环境说明核对
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。