-
for each of the parent , find the last child node.
-
store each of the child node values in a file
-
in the example the last child nodes are
- eleven
- fifteen
- three
- four
- eight
The file will have values like
- eleven
- fifteen
- three
- four
- eight
- if place contains more than one name node at any point, get the first name node of that place, instead of last , get first