bin:encode-string

Encodes a string into binary data using a given encoding.

encode-string($in as xs:string?) ➔ xs:base64Binary?

Arguments

 

$in

xs:string?

Input binary data

Result

xs:base64Binary?

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

Arguments

 

$in

xs:string?

Input binary data

 

$encoding

xs:string

The encoding type to be used

Result

xs:base64Binary?

Namespace

http://expath.org/ns/binary

Links to specifications

EXPath Binary Module

Notes on the Saxon implementation

Supported encodings are: UTF-8, UTF-16, ISO-8859-1 and US-ASCII.