Code:
R_mngr Prod_id customer_id accountid acc_balance acc_code txn_id txn_amt txn_code

100            1          2                 3             1000          Tx            4        500        01
100            1          2                 3             1000          Tn            5        500        02
100.           1.         6.                7.            100.           Xx.           8.       50.        03
200            1          2                 3             1000          Tx            4        500        01
200            1          2                 3             1000          Tn            5        500        02
200          1            6                 7             100.           Xx            8         50         03
How to generate an XML file hierarchaly For each R_mngr. need to avoid all the redundancy. So far I tried with XMLelement query. However it generates the XML for each and every record in the table. But I want an XML file for each relationship manager.