decode-mime-entity

www.altova.com Print this Topic Previous Page Up One Level Next page

Home >  Functions > Function Library Reference > mime >

decode-mime-entity

The decode-mime-entity function returns a string that represents the MIME entity decoded using the charset parameter included in the Content-Type header of the entity. If no charset was specified, you can supply a default encoding, by connecting the desired string value to the default-encoding parameter.

mf-func-decode-mime-entity

 

Arguments

Name

Type

Description

mime-entity

mf:MimeEntity

The MIME entity to be decoded.

default-encoding

xs:string

The default encoding to use when no encoding was specified in the charset parameter.

 

Example

The following mapping calls a Web service that returns JSON content.

mf-func-decode-mime-entity-example-01

When this mapping runs, the result of the Web service call is supplied as input to the decode-mime-entity function. The function decodes the "raw" body returned by the call according to the charset parameter of the Content-Type header. The result is as follows:

mf-func-decode-mime-entity-example-02


© 2019 Altova GmbH