xml.DomDocument.createAttribute

Creates a XML Attribute DomNode object for a DomDocument object.

Syntax

createAttribute(
   elt STRING )  
  RETURNS xml.DomNode
  1. elt defines the name of the XML attribute.

Usage

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

Returns the XML element 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).