DOMDocument.CreateElement
Syntax variant: By name
Syntax:
Parameters:
<ElementName> (required)
Name of created element.
Description of method variant:
- Element name contains characters invalid for XML standard.
Syntax variant: By name and namespace URI
Syntax:
Parameters:
<NamespaceURI> (required)
Namespace URI of created element.
<QualifiedName> (required)
Qualified name of an XML element.
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.
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:
New DOM node - Element with <ElementName> parameter value set for the NodeName property. LocalName, Prefix and NameSpaceURI properties are not defined.
Description:
If attributes with default values are known, they are added to the element automatically.
Availability: