xml | The XML to encode. |
ALL | Optional. Specifies including new line characters in the encoding so the text can be used in attribute definitions. |
Return: | XMLENCODE returns a single value. |
The XMLENCODE function encodes special characters in an XML string (for example, < is converted to <) allowing you to use the CSV option on OUTPUT to produce more complex XML files than are possible by using the XML option.
Example:
encoded := XMLENCODE('<xml version 1><tag>data</tag>');
decoded := XMLDECODE(encoded);
OUTPUT(encoded); //results in '<xml version 1><tag>data</tag>'
OUTPUT(decoded); // results in '<xml version 1><tag>data</tag>'
See Also: XMLDECODE