xml.StaxWriter.setDefaultNamespace

Binds a namespace URI to the default namespace.

Syntax

setDefaultNamespace(
   defaultNS STRING )
  1. defaultNS is the URI to bind to the default namespace, cannot be NULL.

Usage

Binds a namespace URI to the default namespace. The default namespace scope is the current START_ELEMENT / END_ELEMENT pair; defaultNS is the URI to bind to the default namespace, cannot be NULL.

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