xml.DomDocument.createAttribute

Creates an XML Attribute DomNode object for a DomDocument object.

Syntax

createAttribute(
   name STRING )  
  RETURNING object xml.DomNode
  1. name is the name of the XML attribute.

Usage

Creates an XML Attribute DomNode object for a DomDocument object, where name is the name of the XML attribute, cannot be NULL.

Returns a DomNode object, or NULL.

To create a default namespace declaration attribute use xmlns as the name. (Using declareNamespace instead is recommended.)

In case of error, the method throws an exception and sets the STATUS variable with the appropriate error number.