In my previous post in this series, I introduced the Family Traces family tree application. Now, I am going to go through the importing of a gedcom file.
Firstly, what is a gedcom file? The gedcom file format is a text file format for the transmission and storage of genealogical data, created by the Church of the Latter Day Saints for their genealogical projects.
A standard gedcom file has a header section, individual records, family records and notes. The various records are linked to each other by ids, in the format of @I1@ for an individual record for example. For a full spec of the gedcom format, have a look here.
Here is a sample gedcom file
Before we start processing the file, we need to have some data structures to hold the data from the file.
We also need a set of enumerations we will use to keep track of where we are in the file. This is important because the meaning of a field in the file is dependant on the place in the file it occurs, so we need to be aware of what we need to do at all times, but more on that later.