In SQL Server, you can use the SET SHOWPLAN_XML statement to return the query plan for a T-SQL statement in the form of a well-defined XML document. The query plan contains detailed information about how the statement will be executed.
It’s similar to SHOWPLAN_ALL, except that SHOWPLAN_ALL returns its data set of rows that form a hierarchical tree.
You can set SHOWPLAN_XML to either ON or OFF.
When SHOWPLAN_XML is ON, all subsequent T-SQL statements are not executed. Instead SQL Server returns execution information for the statement (without executing it).