The function converts a text string to XML document.
Declaration
INT %XML_FromString(
TEXT in xml
)
Parameters
xml
Text string.
Return value
Handle to the created XML document.
Description
The function converts the text string to XML document. If
the text string is not a valid text representation of XML document, an
invalid value is returned.
Example
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