DOMText クラス

はじめに

DOMText クラスは DOMCharacterData を継承しており、 DOMElement あるいは DOMAttr の中身のテキストを表します。

クラス概要

DOMText
extends DOMCharacterData
/* プロパティ */
public readonly string $wholeText;
/* 継承したプロパティ */
public string $data;
public readonly int $length;
public readonly DOMElementnull $previousElementSibling;
public readonly DOMElementnull $nextElementSibling;
public readonly string $nodeName;
public stringnull $nodeValue;
public readonly int $nodeType;
public readonly DOMNodenull $parentNode;
public readonly DOMElementnull $parentElement;
public readonly DOMNodeList $childNodes;
public readonly DOMNodenull $firstChild;
public readonly DOMNodenull $lastChild;
public readonly DOMNodenull $previousSibling;
public readonly DOMNodenull $nextSibling;
public readonly DOMNamedNodeMapnull $attributes;
public readonly bool $isConnected;
public readonly DOMDocumentnull $ownerDocument;
public readonly stringnull $namespaceURI;
public string $prefix;
public readonly stringnull $localName;
public readonly stringnull $baseURI;
public string $textContent;
/* メソッド */
public DOMText::__construct(string $data = "")
public bool DOMText::isElementContentWhitespace()
public bool DOMText::isWhitespaceInElementContent()
public DOMTextfalse DOMText::splitText(int $offset)
/* 継承したメソッド */
public void after(DOMNodestring ...$nodes)
public true appendData(string $data)
public void before(DOMNodestring ...$nodes)
public bool deleteData(int $offset, int $count)
public bool insertData(int $offset, string $data)
public void remove()
public bool replaceData(int $offset, int $count, string $data)
public void replaceWith(DOMNodestring ...$nodes)
public stringfalse substringData(int $offset, int $count)
public DOMNodefalse DOMNode::appendChild(DOMNode $node)
public stringfalse DOMNode::C14N(
    bool $exclusive = false,
    bool $withComments = false,
    arraynull $xpath = null,
    arraynull $nsPrefixes = null
)
public intfalse DOMNode::C14NFile(
    string $uri,
    bool $exclusive = false,
    bool $withComments = false,
    arraynull $xpath = null,
    arraynull $nsPrefixes = null
)
public DOMNodefalse DOMNode::cloneNode(bool $deep = false)
public int DOMNode::compareDocumentPosition(DOMNode $other)
public bool DOMNode::contains(DOMNodeDOMNameSpaceNodenull $other)
public int DOMNode::getLineNo()
public stringnull DOMNode::getNodePath()
public DOMNode DOMNode::getRootNode(arraynull $options = null)
public bool DOMNode::hasAttributes()
public bool DOMNode::hasChildNodes()
public DOMNodefalse DOMNode::insertBefore(DOMNode $node, DOMNodenull $child = null)
public bool DOMNode::isDefaultNamespace(string $namespace)
public bool DOMNode::isEqualNode(DOMNodenull $otherNode)
public bool DOMNode::isSameNode(DOMNode $otherNode)
public bool DOMNode::isSupported(string $feature, string $version)
public stringnull DOMNode::lookupNamespaceURI(stringnull $prefix)
public stringnull DOMNode::lookupPrefix(string $namespace)
public void DOMNode::normalize()
public DOMNodefalse DOMNode::removeChild(DOMNode $child)
public DOMNodefalse DOMNode::replaceChild(DOMNode $node, DOMNode $child)

プロパティ

wholeText

論理的に隣接した (要素やコメント、処理命令などで分割されていない) テキストノードの全テキストを保持します。

変更履歴

バージョン 説明
8.0.0 実装されていなかったメソッド DOMText::replaceWholeText が削除されました。
目次