| valign='top' | '''Summary'''
|Reads the textual contents of the file specified by <code>$path</code> and returns it as a <code>xs:string</code>.<br />The optional parameter <code>$encoding</code> defines the encoding of the file.<br />
|-
| valign='top' | '''Errors'''
|<b>[[XQuery Errors#File Functions Errors|FOFL0001]]</b> is raised if the specified file does not exist.<br /><b>[[XQuery Errors#File Functions Errors|FOFL0004]]</b> is raised if the specified path is a directory.<br /><b>[[XQuery Errors#File Functions Errors|FOFL0005]]</b> is raised if the specified encoding is not supported, or unknown.<br /><b>[[XQuery Errors#File Functions Errors|FOFL0000]]</b> is raised if the operation fails for some other reason.<br />
|}
==file:read-text-lines==
{|
|-
| valign='top' width='90' | '''Signatures'''
|<code><b>file:read-text-lines</b>($path as xs:string) as xs:string</code><br /><code><b>file:read-text-lines</b>($path as xs:string, $encoding as xs:string) as xs:string*</code><br />
|-
| valign='top' | '''Summary'''
|Reads the textual contents of the file specified by <code>$path</code> and returns it as a sequence of <code>xs:string</code> items.<br />The optional parameter <code>$encoding</code> defines the encoding of the file.<br />
|-
| valign='top' | '''Errors'''