Porovnávané verzie

Kľúč

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

%XML_FromString function


Function
The function converts a text string to an XML document.
Declaration


Blok kódu
languageesl
themeConfluence
INT %XML_FromString(
  TEXT in xml
 )
Parameters


xmlText string.
Return value
Handle to the created XML document.
Description
The function converts the text string to an XML document. If the text string is not a valid text representation of XML document, an invalid value is returned.
Example


Blok kódu
languageesl
themeRDark
 INT _handle, _elements, _element, _nodes, _node
 TEXT _text
 
 _text := "<element>value</element>"
 _handle := %XML_FromString(_text)
 _elements := %XML_GetElementsByTagName(_handle, "element")
 _element := %XML_Item(_elements, 0)
 _nodes := %XML_ChildNodes(_element)
 _node := %XML_Item(_nodes, 0)
 _text := %XML_NodeValue(_node)
 
 ; content of the variable _text
 ; value