RAW mode is not enough,
FOR XML AUTO provides a few more ways to shape your XML output. Its usefulness derives from its capability to produce nested XML elements from rows derived by joining multiple tables, in contrast to the flat structure of
ROOT keyword introduced earlier also applies with
AUTO mode, and it is good practice to continue to use it in your queries. Like
AUTO mode produces attribute-centric XML by default, but you can change this by using the
XMLSCHEMA are also applicable here, having the same effect as with
RAW mode. Listing 49.6 illustrates these points.