saxon:base64Binary-to-string

Converts a binary value to a string, given its encoding.

base64Binary-to-string($input as xs:base64Binary?, $encoding as xs:string) ➔ xs:string?

Arguments

 

$input

xs:base64Binary?

The binary input value

 

$encoding

xs:string

The character encoding

Result

xs:string?

Namespace

http://saxon.sf.net/

Saxon availability

Requires Saxon-PE or Saxon-EE.

Notes on the Saxon implementation

Available since Saxon 8.5.

Details

This function takes as input a xs:base64Binary value and the name of a character encoding (for example UTF8). It interprets the contents of the base64Binary value as a sequence of bytes representing a character string in a particular encoding, and returns the corresponding string.

For example, the call saxon:base64Binary-to-string(xs:base64Binary("RGFzc2Vs"), "UTF8") returns the string Dassel.

If the first argument is an empty sequence, the function returns an empty sequence.

See also:

saxon:string-to-base64Binary()