Can I ask one more question?
If you add several similar lists to this list, for example like the first one, then how should you change your code?
These will be new parents with level=0.
Are you trying to make a GEDCOM interpreter?
Because I think that in this case the work it's completely different.
Or will you manage the data in a different way?
Note that I know nothing about these things...... Just discovered now what they are with this thread.
You think correctly.
I did this in VB.NET over ten years ago.
Now I want to reproduce this code in B4A and B4J.
I did the parsing of the file in B4A in the «Поколения» application. I'm missing the tree view of the file itself.