I have a XML as follows:
<xml>
<grandparent>
<parent>
<father>A</father>
<mother>B</mother>
<children>
<name>C</name>
<name>D</name>
</children>
</parent>
<parent>
<father>E</father>
<mother>F</mother>
<children>
<name>G</name>
<name>H</name>
<name>I</name>
</children>
</parent>
<parent>
<father>J</father>
<mother>K</mother>
<children>
<name>L</name>
</children>
</parent>
</grandparent>
</xml>
How do I loop in this XML and retrieves and parent names and the children names.
I must get the following result: Row 1: A, B, C, D
Row 2: E, F, G, H, I
Row 3: J, K, L
Please help. Thanks.