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 )
  RETURNING object xml.DomDocument
  1. prefix is the prefix of the XML Element or NULL.
  2. name is the name of 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 DomDocument object.

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

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>