xml.StaxWriter.attributeNS

Writes a XML namespace qualified attribute to the StaxWriter stream.

Syntax

attributeNS(
   name STRING,
   ns STRING,
   value STRING )
  1. name defines the local name of the XML attribute, cannot be NULL.
  2. ns defines the namespace URI of the XML attribute, cannot be NULL.
  3. value defines the value of the XML attribute, cannot be NULL.

Usage

Attributes can only be written on the StaxWriter stream if it points to a START_ELEMENT or an EMPTY_ELEMENT, otherwise the operation fails with an exception. This method can only be called after a startElement, startElementNS, emptyElement, emptyElementNS, or attribute and attributeNS.

If namespace URI has not been bound to a prefix with one of the methods setPrefix, declareNamespace, setDefaultNamespace or declareDefaultNamespace, the operation fails with an exception.

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).