xml.DomDocument.declareNamespace

Forces namespace declaration to an XML Element DomNode for a DomDocument object.

Syntax

declareNamespace(
   node xml.DomNode,
   alias STRING,
   ns STRING )
  1. node is the XML Element DomNode that carries the namespace definition.
  2. alias is the alias of the namespace to declare.
  3. ns is the URI of the namespace to declare.

Usage

Forces namespace declaration to an XML Element DomNode for this DomDocument object ; node is the XML Element DomNode that carries the namespace definition; alias is the alias of the namespace to declare, or NULL to declare the default namespace; ns is the URI of the namespace to declare (can only be NULL if alias is NULL).

CAUTION:
Not part of W3C API.

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