By default xquery set indent parameter as no. How to overwrite this in a xquery?
If I want to put "<?xml version="1.0" endoing="UTF-8"?> in the xquery output , where and how to put it? It looks like no matter where I put it, it always gives me compilation error.
directly to the text of an XQuery, but you can force XQuery to return
this by specifying
{?serialization method="xml"?}
as the first line of your XQuery. Please note that the result of the XQuery expression must be well-formed XML then!
What do you mean by indent parameter? Indentation is not a concept of XML. You can only indent a repesentation of XML, e.g. by using a style sheet (see e.g. section SerializationSpec of the Tamino documentation)