Using Transact-SQL for XML
Using mode queries in TSQL for XML allows server to convert result set to related XML formats.Four modes are available for this process:- RAW - converts each row and gives XML format related with each row, could get 'element' command
- AUTO - same as RAW format, however has less flexibility
- EXPLICIT - much more complexity in queries, PATH way is recommended
- PATH - more flexibility and simplicity,used instead of previous mode
For more practice you can test it on Management Studio: