Possible to Parse Nested XML Data structures and combine parent with child

I am starting with that. I can see how to do it if i only ever have 1 parent but when there are muliple parent / children blocks thats what i cant see how to break it down.