xml.DomDocument.createAttributeNS

Creates an XML namespace-qualified Attribute DomNode object for a DomDocument object.

Syntax

createAttributeNS(
   prefix STRING,
   name STRING,
   ns STRING )
  RETURNING object xml.DomNode
  1. prefix is the prefix of the XML attribute.
  2. name is the name of the XML attribute.
  3. ns is the namespace URI of the XML attribute.

Usage

Creates an XML namespace-qualified Attribute DomNode object for this DomDocument object, where prefix is the prefix of the XML attribute, cannot be NULL; name is the name of the XML attribute, cannot be NULL; ns is the namespace URI of the XML attribute, cannot be NULL.

Returns a DomNode object, or NULL.

To create a namespace declaration attribute use xmlns as the prefix and http://www.w3.org/XML/1998/namespace as the namespace. Using declareNamespace instead is recommended.

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