-- The temporal table #t is your table. The field OrderId is necesary, I assume exists in your table.
create table #t (OrderId int, f xml)
insert #t values (6,'')
insert #t values (6,'')
select
1 as tag,
null as parent,
t.OrderId as [Order!1!!hide],
f.value('(/Order/@date)[1]','varchar(10)') as [Order!1!data],
f.value('(/Order/@customerID)[1]','int') as [Order!1!customerID],
null as [OrderItems!2!!hide],
null as [OrderItem!3!OrderID],
null as [OrderItem!3!ItemID],
null as [OrderItem!3!quantity]
from #t as [t]
where
f.value('(/Order/@date)[1]','varchar(10)') is not null -- if is possible change the condition using another field
union all
select distinct
2 as tag,
1 as parent,
t.OrderId as [Order!1!!hide],
null as [Order!1!data],
null as [Order!1!customerID],
1 as [OrderItems!2!!hide],
null as [OrderItem!3!OrderID],
null as [OrderItem!3!ItemID],
null as [OrderItem!3!quantity]
from #t as [t]
union all
select
3 as tag,
2 as parent,
t.OrderId as [Order!1!!hide],
null as [Order!1!data],
null as [Order!1!customerID],
1 as [OrderItems!2!!hide],
f.value('(/OrderItem/@OrderID)[1]','int') as [OrderItem!3!OrderID],
f.value('(/OrderItem/@ItemID)[1]','int') as [OrderItem!3!ItemID],
f.value('(/OrderItem/@quantity)[1]','int') as [OrderItem!3!quantity]
from #t as [t]
where
f.value('(/OrderItem/@OrderID)[1]','int') is not null-- if is possible change the condition using another field
ORDER BY
[Order!1!!hide],
[OrderItems!2!!hide],
[OrderItem!3!OrderID]
FOR XML EXPLICIT, ROOT('Orders'), TYPE