| Specifies the serialization method:
* {{Code|xml}}, {{Code|xhtml}}, {{Code|html}}, and {{Code|text}} are adopted from the official specification.
* {{Code|json}} and {{Code|jsonml}} are specific to BaseX and can be used to output XML nodes in as JSON objects (see the [[JSON format Module]] for more details).* {{Version|7.7.2}}: {{Code|csv}} are specific to BaseX and can be used to output XML nodes as CSV data (see the [[JSON CSV Module]] for more details).
* {{Code|raw}} is BaseX-specific as well: Binary data types are output in their ''raw'' form, i.e., without modifications. For all other types, the items’ string values are returned. No indentation takes place, and and no characters are encoded via entities.
| {{Code|xml}}, {{Code|xhtml}}, {{Code|html}}, {{Code|text}}, {{Code|csv}}, {{Code|json}}, {{Code|jsonml}}, {{Code|raw}}
| {{Code|xml}}
| <code>method=xml</code>