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. Depending on the error, a human-readable description of the problem is available in the SQLCA.SQLERRM register. See Error handling in GWS calls (STATUS).