Byte arrays may be constructed using either the bytes pre-defined datatype or a generic array construction.

The latter has the advantage that individual array element values may be obtained from script variables (which the pre-defined datatype constructor does not allow).

Pre-defined datatype constructor

Using the pre-defined datatype constructor, the byte array content is specified using a comma-separated list of two-digit hexadecimal values. For example:

<bytes bytes="68,65,6c,6c,6f"/>

Generic array constructor

The same value can be constructed using a generic array constructor, like this:

<array class="byte[]">
    <element value="104"/>
    <element value="101"/>
    <element value="108"/>
    <element value="108"/>
    <element value="111"/>
</array>
Warning The generic array constructor does not support hexadecimal input, so values must be converted to decimal.
Previous page Next page