I am using SQL Server Express 2017 My Table looks like this +-------------+ | ID | Name | +-------------+ | 1 | Bert | | 2 | Agnes | | 3 | Diane | +-------------+ I'm looking for this kind of query result: <MyRootElement> <MyTag ID='1' Name='Bert' /> <MyTag ID='2' Name='Agnes' /> <MyTag ID='3' Name='Diane' /> </MyRootElement Can anyone help me, please? Thanks in advance!