The DOMAttr class
(PHP 5, PHP 7, PHP 8)
Introduction
DOMAttr represents an attribute in the DOMElement object.
Class synopsis
/* Inherited constants */
/* Properties */
/* Inherited properties */
/* Methods */
/* Inherited methods */
public DOMNode::C14N(
bool
bool
?array
?array
): string|false
}bool
$exclusive = false,bool
$withComments = false,?array
$xpath = null,?array
$nsPrefixes = null): string|false
Properties
- name
The name of the attribute.
- ownerElement
The element which contains the attribute or
null.- schemaTypeInfo
Not implemented yet, always is
null.- specified
Not implemented yet, always is
true.- value
The value of the attribute.
Note:
Note, XML entities are expanded upon setting a value. Thus the
&character has a special meaning. Setting value to itself will fail when value contains an&. To avoid entity expansion, use DOMElement::setAttribute() instead.
See Also
Table of Contents
- DOMAttr::__construct — Creates a new DOMAttr object
- DOMAttr::isId — Checks if attribute is a defined ID
↑ and ↓ to navigate • Enter to select • Esc to close • / to open