file:read-text

Returns the content of a file in its string representation.

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

Arguments

 

$file

xs:string

Path to file

Result

xs:string

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

Arguments

 

$file

xs:string

Path to file

 

$encoding

xs:string

Encoding used for string-binary conversion

Result

xs:string

Namespace

http://expath.org/ns/file

Links to specifications

EXPath File Module

Saxon availability

Available whether or not support for XPath 3.0 is enabled. Implemented since Saxon 9.5. Requires Saxon-PE or Saxon-EE.