Group according to its parent and children : This is the output of my List. I need help in grouping the children with their parent. Thanks for your help.

0).
nodeID id_0 |
nodeName Test 3 |
parentID id_0
********************************************
1).
nodeID id_72864 |
nodeName Element A |
parentID id_0 
********************************************
2).
nodeID id_72865 |
nodeName Element B |
parentID id_0
********************************************
3).
nodeID id_72866 |
nodeName Element C |
parentID id_0
********************************************
4).
nodeID id_72867 |
nodeName Element D |
parentID id_0
********************************************
5).
nodeID id_72868 |
nodeName Element E |
parentID id_0
********************************************
6).
nodeID id_72869 |
nodeName Element 1 |
parentID id_72864
********************************************
7).
nodeID id_72870 |
nodeName Element 2 |
parentID id_72865
********************************************
8).
nodeID id_108185 |
nodeName Element |
parentID id_72865
********************************************
9).
nodeID id_72871 |
nodeName Element 3 |
parentID id_72866
********************************************
10).
nodeID id_72872 |
nodeName Element 4 |
parentID id_72867
********************************************
11).
nodeID id_73527 |
nodeName Element 5 |
parentID id_72868
*********************************************