file:read-text-lines

Returns the contents of a file as a sequence of strings, separated at newline boundaries.

read-text-lines($file as xs:string, $options as (xs:string | map(*))?:=()) ➔ xs:string*

Arguments

 

$file

xs:string

Path to file

 

$options

(xs:string | map(*))?

:= ()

Options for reading the file. In EXPath 1.0, the argument is a string, providing the encoding to be used for string-binary conversion. From Saxon 13.0, in EXPath 4.0 a map can be provided.

Result

xs:string*

Namespace

http://expath.org/ns/file

Links to specifications

EXPath File Module 1.0

EXPath File Module 4.0

Saxon availability

Available in XPath 2.0 and later versions. Implemented since Saxon 9.5. Requires Saxon-PE or Saxon-EE. Available for all platforms.