Skip navigation links
Expressively and easily automate your text documents with TExpressive!
Menu
TExpressive
Expressively and easily automate your text documents with TExpressive!

Encode function

Encodes "What" so that it can be used with the format specified by "For".

Remarks

Arguments

What
The value(s) to encode.
For
The format to encode for.  Supported options:
Option Encoding type Value type
HTML HTML single value
XML XML single value
XMLTree XML tree (fragment) multiple values in an XML structure
URL URL single value
URLParams URL parameters multiple values in an URL parameters structure
CSV comma-separated value single value
CSVLine comma-separated value line multiple values in a data line structure
CSVLines comma-separated value lines multiple values in a data lines structure
TSV tab-separated value single value
TSVLine tab-separated value line multiple values in a data line structure
TSVLines tab-separated value lines multiple values in a data lines structure
RTF * rich text format single value
TExpressiveScript TExpressive script fragment single value
TExpressiveLiteral TExpressive literal text single value

*: When encoding to RTF, international (Unicode) characters will be replaced with a format useable in RTF.  Unicode characters can however not be decoded again by Decode.  Also make sure that RTF files will always be saved using ASCII encoding, otherwise the files will not be recognized as RTF files.

Specific parameter structures

TExpressive uses a specific parameter structure per coding type for storing more complex data structures.

XML structure (XMLTree)

Main parameter
the main parameter for the structure that forms the XML root tag; under that the sub parameters:
Name
the name of this tag
Value
the value of this tag
Attributes (optional)
all attributes of this tag; under that the sub parameters:
#1
one sub parameter per attribute (the parameter name and value are not used); under that the sub parameters:
Name
the name of this attribute
Value
the value of this attribute
#2, #3, ... etc.
other remaining attributes
SubTags (optional)
all sub tags of this tag; under that the sub parameters:
#1
one sub parameter per sub tag (the parameter name and value are not used); under that the sub parameters:
Name
the name of this sub tag
Value
the value of this sub tag
Attributes (optional)
all attributes of this sub tag; the further set-up is identical to that of the root tag
SubTags (optional)
all sub tags of this sub tag; the further set-up is identical to that of the root tag
#2, #3, ... etc.
other remaining sub tags

URL parameter structure (URLParams)

Main parameter
the main parameter holding all URL parameters; under that the sub parameters:
#1
one sub parameter per URL parameter (the parameter name and value are not used); under that the sub parameters:
Name
the name of this URL parameter
Value
the value of this URL parameter
#2, #3, ... etc.
other remaining URL parameters

Data line structure (CSVLine, TSVLine)

Main parameter
the main parameter holding all values on the line; under that the sub parameters:
#1
one sub parameter per value on the line; the parameter value is the value to use
#2, #3, ... etc.
other remaining values

Data lines structure (CSVLines, TSVLines)

Main parameter
the main parameter holding all data lines; under that the sub parameters:
#1
one sub parameter per data line; under that the sub parameters:
#1
one sub parameter per value on the line; the parameter value is the value to use
#2, #3, ... etc.
other remaining values
#2, #3, ... etc.
other remaining lines