expath-file:read-text

Reads the contents of a file as a string.

read-text($file as xs:string) ➔ xs:string

Arguments

 

$file

xs:string

The file to be read

Result

xs:string

read-text($file as xs:string, $encoding as xs:string) ➔ xs:string

Arguments

 

$file

xs:string

The file to be read

 

$encoding

xs:string

Character encoding

Result

xs:string

Details

Namespace: http://expath.org/ns/file

Notes on the Saxon implementation

Implemented since Saxon 9.5; available whether or not support for XPath 3.0 is enabled