The DOMDocumentFragment class
(PHP 5, PHP 7, PHP 8)
Class synopsis
bool
$exclusive
= false
,bool
$withComments
= false
,?array
$xpath
= null
,?array
$nsPrefixes
= null
): string|false
string
$uri
,bool
$exclusive
= false
,bool
$withComments
= false
,?array
$xpath
= null
,?array
$nsPrefixes
= null
): int|false
Properties
- childElementCount
-
The number of child elements.
- firstElementChild
-
First child element or
null
. - lastElementChild
-
Last child element or
null
.
Changelog
Version | Description |
---|---|
8.0.0 | The firstElementChild, lastElementChild, and childElementCount properties have been added. |
8.0.0 | DOMDocumentFragment implements DOMParentNode now. |
Table of Contents
- DOMDocumentFragment::appendXML — Append raw XML data
- DOMDocumentFragment::__construct — Constructs a DOMDocumentFragment object