Porovnávané verzie

Kľúč

  • Tento riadok sa pridal
  • Riadok je odstránený.
  • Formátovanie sa zmenilo.

%XML_GetElementText function


Function
The function returns a text string stored in an XML element.
Declaration


Blok kódu
languageesl
themeConfluence
TEXT %XML_GetElementText(
   INT in node,
   TEXT in element,
 [ TEXT in namespace := "" ]
 )
Parameters


nodeHandle to parent XML nod or XML list.
elementName of element, from which a text is obtained.
namespaceOptional parameter that defines the name of namespace or prefix of an XML element. The value "*" is used, when there is not
necessary
the necessity to explicitly take into account namespace and the searching is done only by the element name.
Return value
 
Description
The function returns a text string stored in an XML element, which is defined by the name of an element and a namespace or its prefix. If more than one element match the defined parameters, the function returns invalid value.
The searching is done recursively to the depth, therefore it is recommended to place the handle to a parent element as close as possible to the required XML element in the hierarchical XML structure. If the function returns an invalid result, you may find out the information about error by calling the function %XML_GetLastErrorMessage.
Example


Blok kódu
languageesl
themeRDark
TEXT _errorCodeText 
 TEXT _text 
 _text := %XML_GetElementText(_doc,"td","h")
 IF (!_text\VLD) THEN 
 _errorCodeText := %XML_GetLastErrorMessage()
 ENDIF