How to transform results of a select statement formatted as XML?
The query doesn't know (or care) how its results might be formatted by the client (the mysql program in this case), so no, you cannot influence the XML in the query itself. What you're looking for is called XSL transformation, for which there are command line tools (e.g. xmlstarlet) through which you can pipe your output.