Decode an array byte.

1 byte.decode

<byte.decode type='BASE64|UC|UU'>
    <data /> !
</byte.decode>

Exceptions

requires 1 values, received [...]

It has been specified an incorrect number of values.

Remarks

Admits as value any convertible data type to array byte: a string, an array of bytes, a node (of a XML or HTML document), a BLOB (Binary Large Object) or a file.

Example

Codify or decode a string.

Copy
<xsql-script name='byte_decode_sample1'>
    <body>
        <set name='m_data'>Hello world.</set>
        <set name='m_encode'>
            <byte.encode type='BASE64'>
                <m_data />
            </byte.encode>
        </set>
        <println><m_encode /></println>
        <set name='m_decode'>
            <byte.decode type='BASE64'>
                <m_encode />
            </byte.decode>
        </set>
        <println><m_decode /></println>
    </body>
</xsql-script>

The result will be:

Copy
48656c6c6f20776f726c642e
Hello world.