DOMDocumentFragment クラス

クラス概要

DOMDocumentFragment
extends DOMNode
implements DOMParentNode
/* プロパティ */
public readonly DOMElementnull $firstElementChild;
public readonly DOMElementnull $lastElementChild;
public readonly int $childElementCount;
/* 継承したプロパティ */
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 DOMDocumentFragment::__construct()
public void DOMDocumentFragment::append(DOMNodestring ...$nodes)
public bool DOMDocumentFragment::appendXML(string $data)
public void DOMDocumentFragment::prepend(DOMNodestring ...$nodes)
public void DOMDocumentFragment::replaceChildren(DOMNodestring ...$nodes)
/* 継承したメソッド */
public DOMNodefalse appendChild(DOMNode $node)
public stringfalse C14N(
    bool $exclusive = false,
    bool $withComments = false,
    arraynull $xpath = null,
    arraynull $nsPrefixes = null
)
public intfalse C14NFile(
    string $uri,
    bool $exclusive = false,
    bool $withComments = false,
    arraynull $xpath = null,
    arraynull $nsPrefixes = null
)
public DOMNodefalse cloneNode(bool $deep = false)
public int compareDocumentPosition(DOMNode $other)
public bool contains(DOMNodeDOMNameSpaceNodenull $other)
public int getLineNo()
public stringnull getNodePath()
public DOMNode getRootNode(arraynull $options = null)
public bool hasAttributes()
public bool hasChildNodes()
public DOMNodefalse insertBefore(DOMNode $node, DOMNodenull $child = null)
public bool isDefaultNamespace(string $namespace)
public bool isEqualNode(DOMNodenull $otherNode)
public bool isSameNode(DOMNode $otherNode)
public bool isSupported(string $feature, string $version)
public stringnull lookupNamespaceURI(stringnull $prefix)
public stringnull lookupPrefix(string $namespace)
public void normalize()
public DOMNodefalse removeChild(DOMNode $child)
public DOMNodefalse replaceChild(DOMNode $node, DOMNode $child)

プロパティ

childElementCount

子要素の数。

firstElementChild

最初の子要素。存在しない場合は null になります。

lastElementChild

最後の子要素。存在しない場合は null になります。

変更履歴

バージョン 説明
8.0.0 プロパティ firstElementChild, lastElementChild, childElementCount が追加されました。
8.0.0 DOMDocumentFragment は、 DOMParentNode を実装しました。
目次