In Oracle Apex >> Shared Component >> Report Queries, I have a report query which contains 2 source query as bellow:

When I download XML file, master and detail are in same level and I'm not be able to create a master/detail report in bi publisher with bi publisher desktop.
but in oracle bi publisher environment there is an option which I can grouping columns, that means which one be as master and which one be as detail, I should add in bi publisher I just create 1 dataset not 2 resource query like Oracle Apex:

SO my question is, is there any solution to grouping XML out put in Oracle Apex as well as Oracle Bi Publisher environment?