ASA SQL User's Guide
Using XML in the Database
Adaptive Server Anywhere provides two ways to export your relational data as XML: the Interactive SQL OUTPUT statement and the ADO.NET DataSet object. Both the OUTPUT statement and the ADO.NET DataSet object are used to save your relational data as XML.
The FOR XML clause and SQL/XML functions allow you to generate the results as XML from the relational data in your database. You can then export the generated XML to a file using the UNLOAD statement or the xp_write_file system procedure.
Exporting relational data as XML from Interactive SQL
Exporting relational data as XML using the DataSet object