%XML_Add_NS_Definition function


Function
The function inserts the definition of namespace to an element of XML document.
Declaration
TEXT %XML_Add_NS_Definition(
   INT in node,
   TEXT in namespaceURI,
   TEXT in namespacePrefix
 )

Parameters
node Handle to XML element, in which a namespace is to be defined.
namespaceURI Name of namespace.
namespacePrefix Name of prefix.

Return value
 
Description
The function inserts the definition of namespace to the element of XML document. The definition consists of a unique name of namespace (URI ) and its prefix. In fact, it is just inserting the attribute of XML element according to this convention:

<element xmlns:h="http//:xxx">

where "h" is the prefix name of namespace and "http//:xxx" is name of namespace, i.e. URI.
Example
 BOOL _bAdded 
 _bAdded := %XML_Add_NS_Definition(%XML_Item(_iElement,0),"http://localhost","h") 

Napíšte komentár