Get the text value of an XML element

WTSupported in traditional Synergy on Windows
WNSupported in Synergy .NET on Windows
USupported on UNIX
VSupported on OpenVMS
status = %XML_ELEM_GETTEXT(element, text[, length])

Return value


XML_SUCCESS if a nonblank text value is returned.



The XML element instance to get a value for. (XML_ELEM_TYPE)


Returned with the text string value of the element. The maximum length is 65,534 characters. (a)


(optional) Returned with the length of the returned text. (n)


%XML_ELEM_GETTEXT returns the text that appears between the specified element’s opening tag and closing tag, including any embedded XML documents delimited by CDATA. To control whether text or attribute values are escaped or unescaped, use the ENCODE option of %XML_OPTION. To control whether leading and trailing blanks are stripped in the text element, use the PARSER option of %XML_OPTION. (See %XML_OPTION.)

This function is defined as ^VAL.


If you want to receive variable‑length data in a large buffer, we recommend using the length argument, as this will avoid time spent clearing the remainder of the buffer (beyond length) with spaces.