saxon:string-to-base64Binary

Encodes a string to an xs:base64Binary value, using a given encoding

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

Arguments

 

$in

xs:string

The input string

 

$encoding

xs:string

The encoding of the input string

Result

xs:base64Binary

Details

Namespace: http://saxon.sf.net/

This function takes as input a string and the name of a character encoding (for example "UTF8"). It encodes the contents of the string value as a sequence of bytes using a particular encoding, and returns the xs:base64Binary representation of this sequence of bytes.

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