xml.StaxWriter.setPrefix

Binds a namespace URI to a prefix.

Syntax

setPrefix(
   prefix STRING,
   ns STRING )
  1. prefix is the prefix to be bind to the URI, cannot be NULL.
  2. ns is the namespace URI to be bind to the prefix, cannot be NULL.

Usage

The prefix scope is the current START_ELEMENT / END_ELEMENT pair.

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