Returns the string with the MIME type (MultiPurpose Internet Mail Extension) from the taken content as array byte.

1 byte.getMimeType

<byte.getMimeType>
    <data /> !
</byte.getMimeType>

Exceptions

requires 1 values, received [...]

It has been specified an incorrect number of values.

Remarks

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

Example

Gets the MIME type of a file.

Copy
<xsql-script name='byte_getMimeType_sample1'>
    <body>
        <println>
            <byte.getMimeType>
                <file name='z:\test.xml' type='absolute' />
            </byte.getMimeType>
        </println>
    </body>
</xsql-script>

The result will be: application/octet-stream

Copy
application/octet-stream