DOMDocument::createAttribute

(PHP 5, PHP 7, PHP 8)

DOMDocument::createAttributeCreate new attribute

Beschreibung

publicDOMDocument::createAttribute(string$localName): DOMAttr|false

This function creates a new instance of class DOMAttr. Dieser Knoten wird im Dokument erst dann angezeigt, wenn er mit (z. B.) DOMNode::appendChild() eingefügt wird.

Parameter-Liste

localName

The name of the attribute.

Rückgabewerte

The new DOMAttr or false if an error occurred.

Fehler/Exceptions

DOM_INVALID_CHARACTER_ERR

Raised if localName contains an invalid character.

Siehe auch

To Top