DOMDocument.CreateAttribute
Syntax variant: By name
Syntax:
Parameters:
<Name> (required)
Name of created attribute.
Description of method variant:
- Attribute name contains characters invalid for XML standard.
Syntax variant: By local name and namespace URI
Syntax:
Parameters:
<NamespaceURI> (required)
Namespace URI.
<QualifiedName> (required)
Qualified name of an attribute.
Description of method variant:
DOMDocument.NodeName - by the value of <QualifiedName> parameter;
DOMDocument.NamespaceURI - by the value of <NamespaceURI> parameter;
DOMDocument.Prefix - prefix from <QualifiedName> parameter or an empty string, if no prefix; DOMDocument.LocalName - local name from <QualifiedName> parameter;
TagName - by the value of <QualifiedName> parameter;
DOMDocument.NodeValue - empty string.
Exception call reasons:
- Qualified name contains characters invalid for XML standard of this document;
- Qualified name contains prefix invalid for this namespace URI value.
Returned value:
The node name (nodeName) is set to name. The local name (localName), prexif (prefix) and namespace URI (namespaceURI) are not set.
The attribute value is not set up either.
Description:
Availability: