xml.DomDocument.createDocumentNS

Constructor of a DomDocument with a root namespace-qualified XML root element

Syntax

xml.DomDocument.createDocumentNS(
   prefix STRING,
   name STRING,
   ns STRING )
  RETURNS xml.DomDocument
  1. prefix defines the prefix of the XML Element or NULL.
  2. name defines the XML element.
  3. ns is the namespace of the XML Element.

Usage

Constructor of a xml.DomDocument with a root namespace-qualified XML root element where prefix is the prefix of the XML element or NULL, name is the name of the XML element, and ns is the namespace of the XML element. Returns a xml.DomDocument object.

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

Example

Create a DomDocument with an initial root node named "List" with abc as the prefix and http://www.mysite.com/xmlapi as the namespace:

xml.domdocument.createDocumentNS("abc","List","http://www.mysite.com/xmlapi")

Produces:

<abc:List xmlns:abc="http://www.mysite.com/xmlapi">
[...]
</abc:List>