SQL XML:
You can generate XML from SQL queries without even doing single line of code in your programming language. Below is the script used in above video:
--Query 1
select 1 as tag,null as parent,
c.customerid as [Customers!1!Customerid],
null as [order!2!orderid]
from customers c inner join orders o
on o.customerid=c.customerid
union
select 2 as tag,1 as parent,
c.customerid,
o.orderid
from customers c inner join orders o
on o.customerid=c.customerid
order by [Customers!1!Customerid],[order!2!orderid]
for xml auto
--Query 2
select 1 as tag,null as parent,
c.customerid as [Customers!1!Customerid],
null as [order!2!orderid]
from customers c inner join orders o
on o.customerid=c.customerid
union
select 2 as tag,
...
Read more »