The DOMCharacterData class
(PHP 5, PHP 7, PHP 8)
简介
Represents nodes with character data. No nodes directly correspond to this class, but other nodes do inherit from it.
类摘要
/* 属性 */
/* 继承的属性 */
/* 方法 */
/* 继承的方法 */
public DOMNode::C14N(
bool
bool
?array
?array
): string|false
bool
$exclusive
= false
,bool
$withComments
= false
,?array
$xpath
= null
,?array
$nsPrefixes
= null
): string|false
public DOMNode::C14NFile(
string
bool
bool
?array
?array
): int|false
}string
$uri
,bool
$exclusive
= false
,bool
$withComments
= false
,?array
$xpath
= null
,?array
$nsPrefixes
= null
): int|false
属性
- data
-
The contents of the node.
- length
-
The length of the contents.
- nextElementSibling
-
The next sibling element or
null
. - previousElementSibling
-
The previous sibling element or
null
.
更新日志
版本 | 说明 |
---|---|
8.0.0 | The nextElementSibling and previousElementSibling properties have been added. |
8.0.0 | DOMCharacterData implements DOMChildNode now. |
目录
- DOMCharacterData::appendData — Append the string to the end of the character data of the node
- DOMCharacterData::deleteData — Remove a range of characters from the node
- DOMCharacterData::insertData — Insert a string at the specified 16-bit unit offset
- DOMCharacterData::replaceData — Replace a substring within the DOMCharacterData node
- DOMCharacterData::substringData — Extracts a range of data from the node

User Contributed Notes 1 note
jesdisciple dot FOO at gmail dot BAR dot com ¶
11 years ago
In case you're looking for the CDATA class to which nodes /do/ correspond, it's called DOMCdataSection (per my PHP installation) and isn't documented on php.net. Presumably, it doesn't add anything to this API.
See also: http://www.php.net/manual/en/domdocument.createcdatasection.php
备份地址:http://www.lvesu.com/blog/php/class.domcharacterdata.php