* including them in the [[XQuery_3.0#Serialization|prolog of the XQuery expression]];
* specifying them in the XQuery functions [[File_Module#file:write|file:write()]] or [[XQuery_3.0#Functions|fn:serialize()]]. The serialization parameters are specified as
** children of an {{Code|<output:serialization-parameters/>}} element, as defined for the [httphttps://www.w3.org/TR/xpath-functions-3031/#func-serialize fn:serialize()] function, or as
** map, which contains all key/value pairs: <code>map { "method": "xml", "cdata-section-elements": "div", ... }</code>;
* using the {{Code|-s}} flag of the BaseX [[Command-Line Options#BaseX Standalone|command-line]] clients;