Die Klasse DOMElement
(PHP 5, PHP 7, PHP 8)
Klassenbeschreibung
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
Eigenschaften
- childElementCount
-
Die Anzahl der Kindelemente.
- firstElementChild
-
Erstes Kindelement oder
null. - lastElementChild
-
Letztes Kindelement oder
null. - nextElementSibling
-
Das nächste Geschwisterelement oder
null. - previousElementSibling
-
Das vorherige Geschwisterelement oder
null. - schemaTypeInfo
-
Noch nicht implementiert, gibt immer
nullzurück - tagName
-
Der Name des Elements
Changelog
| Version | Beschreibung |
|---|---|
| 8.0.0 | Die Eigenschaften firstElementChild, lastElementChild, childElementCount, previousElementSibling, und nextElementSibling wurden hinzugefügt. |
| 8.0.0 | DOMElement implementiert nun DOMParentNode und DOMChildNode. |
Anmerkungen
Hinweis:
Die Erweiterung DOM verwendet die UTF-8 Kodierung. Es kann mb_convert_encoding(), UConverter::transcode() oder iconv() verwendet werden, um mit anderen Zeichenkodierungen zu arbeiten.
Inhaltsverzeichnis
- DOMElement::__construct — Creates a new DOMElement object
- DOMElement::getAttribute — Returns value of attribute
- DOMElement::getAttributeNode — Returns attribute node
- DOMElement::getAttributeNodeNS — Returns attribute node
- DOMElement::getAttributeNS — Returns value of attribute
- DOMElement::getElementsByTagName — Gets elements by tagname
- DOMElement::getElementsByTagNameNS — Get elements by namespaceURI and localName
- DOMElement::hasAttribute — Checks to see if attribute exists
- DOMElement::hasAttributeNS — Checks to see if attribute exists
- DOMElement::removeAttribute — Removes attribute
- DOMElement::removeAttributeNode — Removes attribute
- DOMElement::removeAttributeNS — Removes attribute
- DOMElement::setAttribute — Adds new or modifies existing attribute
- DOMElement::setAttributeNode — Adds new attribute node to element
- DOMElement::setAttributeNodeNS — Adds new attribute node to element
- DOMElement::setAttributeNS — Adds new attribute
- DOMElement::setIdAttribute — Declares the attribute specified by name to be of type ID
- DOMElement::setIdAttributeNode — Declares the attribute specified by node to be of type ID
- DOMElement::setIdAttributeNS — Declares the attribute specified by local name and namespace URI to be of type ID

