Encoding/Decoding Formatters

Version 24.1.8906


Encoding/Decoding Formatters


base64decode()

Converts the attribute value to a base 64 decoded string.

base64encode()

Converts the attribute value to a base 64 encoded string.

csvescape()

Returns CSV data from the column that matches a value with each element output as individual results.

Example

In the following example, both the csv function and the csvescape options are output from the sample CSV document.

<arc:call op="csvListRecords">
Standard output: [csv('column1')], [csv('column2')], [csv('column3')]
Output with csvescape(): [csv('column1') | csvescape()], [csv('column2') | csvescape()], [csv('column3') | csvescape()]
</arc:call>

Running this code displays the following output for the first row under the CSV headers.

Standard output: entry1, entry2, entry3
Output with csvescape(): "entry1", "entry2", "entry3"

jsonescape()

Converts the attribute value to a JSON-escaped, single-line string.

md5hash([converttobase64])

Computes the MD5 hash of the attribute value.

  • encodetobase64: The optional boolean value that specifies whether to convert the result into a base 64 encoded string. Default is true.

sha1hash([converttobase64])

Computes the SHA-1 hash of the attribute value.

  • encodetobase64: The optional boolean value that specifies whether to convert the result into a base 64 encoded string. Default is true.

sqlescape()

Converts the attribute value to an SQL-escaped, single-line string.

  • dbtype: The database type to encode. The allowed values are SQL or SQLite. Default is SQL.

xmldecode()

Converts the attribute value to a XML decoded string.

xmlencode()

Converts the attribute value to a XML encoded string.