SQL Server Query
DECLARE @DATE AS DATETIME
SET @DATE = GETDATE()
SELECT @DATE as Todays
DECLARE @USERS AS TABLE(UserId INT, Name NVARCHAR(255))
INSERT @USERS VALUES(1001, 'Anil Singh')
INSERT @USERS VALUES(1002, 'Sunil Singh')
INSERT @USERS VALUES(1003, 'Sushil Singh')
DECLARE @UserXML XML = (SELECT * FROM @USERS FOR XML AUTO)
SELECT * FROM @USERS
SELECT @UserXML as UserAsXML_Formatt
The output as see below