I'm writing here an example about how to read XMLs that contains hierarchichal data, not only with one level of child nodes. So, I'm about to threat this problem here.
First, I'll define a sample XML hierarchy. The XML contains a list of Headers, each one containing a list of Details.
Now, let's create some simple model classes.
Now, to read the XML data into this hierarchy of objects, I'm gonna create one method for each level of the hierarchy (GetHeaders - will return all the Headers, GetDetails(header) - will return a list of Detail's for one Header.
Basically, a method will return a list of childrens based on the parent node.