The FOR XML clause and the SQL/XML functions supported by SQL Anywhere give you two alternatives for generating XML from your
relational data. You can usually use one or the other to generate the same XML.

If you are generating deeply-nested documents, a FOR XML EXPLICIT query will likely be more efficient than a SQL/XML query
because EXPLICIT mode queries normally use a UNION to generate nesting, while SQL/XML uses subqueries to generate the required
nesting.