I just download ApexSQL refactor in order to make some tests.
Unfortunately on of the first thing I tried return an error. (Invalid syntax near FOR. In fact every single query using XML return a syntax from Refactor. Does it exists a setting somewhere that will correct this behavior?
DECLARE @X XML
SELECT @X = (
SELECT ID [@ID],
[Name] [@Name]
FROM dbo.[MyTable] [A]
FOR XML PATH(N'MyTable'), ROOT(N'Objects'), TYPE
)