|Writes serialized {{$input}} to the specified file. If the file already exists, it will be overwritten.<br/>The {{Code|$options}} argument contains [[Serialization|serialization parameters]]. As with [https://www.w3.org/TR/xpath-functions-31/#func-serialize fn:serialize()], the parameters can be specified<br/>
* either as children of an {{Code|<output:serialization-parameters/>}} element:
<syntaxhighlight pre lang="xml">
<output:serialization-parameters>
<output:method value='xml'/>