DOMDocument
PHP Manual

DOMDocument::createAttribute

(PHP 5)

DOMDocument::createAttributeCreate new attribute

Описание

DOMAttr DOMDocument::createAttribute ( string $name )

This function creates a new instance of class DOMAttr. Този възел няма да се показва в документа докато не бъде вмъкнат с DOMNode->appendChild().

Параметри

name

The name of the attribute.

Връщани стойности

The new DOMAttr or FALSE if an error occured.

Грешки/Изключения

DOM_INVALID_CHARACTER_ERR

Raised if name contains an invalid character.

Вж. също


DOMDocument
PHP Manual