%XML_Set_Node_NS function


Function
The function inserts recursively a namespace prefix to the name of all children of the XML element including the parent.
Declaration
BOOL %XML_Set_Node_NS(
   INT in node,
   TEXT in namespacePrefix
 )
Parameters
nodeHandle of the XML element.
namespacePrefixName of prefix.
Return value
 
Description
This function inserts recursively a namespace prefix to the name of all children of the XML element including the parent. Before its calling, you must initialize the function %XML_Add_NS_Definition. It ensures to pair the prefix with particular namespace name. If the function returns an invalid result, you may find out the information about error by calling the function %XML_GetLastErrorMessage.
Example
 BOOL _bAdded, _bSucc 
 INT _iElement
 
 _bAdded := %XML_Add_NS_Definition(%XML_Item(_iElement,0),"http://localhost","h")
 _iElement := %XML_GetElementsByTagName(%XML_Item(_iElement,0),"value_1")
 
 ; <h:value_1> element arises from <value_1>
 
 _bSucc := %XML_Set_Node_NS(%XML_Item(_iElement,0),"h") 
Napíšte komentár