file:write

Writes a sequence of items to a file. If $file already exists, it will be overwritten; otherwise, it will be created.

write($file as xs:string, $items as item()*) ➔ empty-sequence()

Arguments

 

$file

xs:string

Path to file

 

$items

item()*

Sequence of items to be written

Result

empty-sequence()

write($file as xs:string, $items as item()*, $params as element(output:serialization-parameters)) ➔ empty-sequence()

Arguments

 

$file

xs:string

Path to file

 

$items

item()*

Sequence of items to be written

 

$params

element(output:serialization-parameters)

Control parameters for serialization - semantics similar to fs:serialize()

Result

empty-sequence()

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.