XmlGetNodeName Function

Action

Returns the name of the passed node.

Include file

XmlAPI.bdh

Syntax

XmlGetNodeName( in     hNode        : number,
                inout  sName        : string,
                in     nMaxNameLen  : number optional ): boolean;

Return value

  • true if successful

  • false otherwise

Parameter Description
hNode Handle to an XML node.
sName String variable that receives the name of the node.
nMaxNameLen Maximum length of the string to return (optional). If this parameter is omitted or set to STRING_COMPLETE all available data is stored in sName.

Example

dcltrans
  transaction TMain
  var
   hDocument, hResult : number;
   sName              : string;
  begin
    hDocument := XmlCreateDocumentFromXml( "<root><child1 attr1='avalue1'>childvalue1</child1>"
                "<child2 attr1= 'avalue2'>childvalue2</child2></root>");
    hResult := XmlSelectSingleNode(hDocument, "/root/child2");
    XmlGetNodeName(hResult, sName);
  end TMain;