G
Gustaf
For practice, I have a go at implementing the GEDCOM 5.5 standard for
genealogy. Here's a sample of the file format:
http://homepages.rootsweb.ancestry.com/~pmcbride/gedcom/55gcch2.htm#S6
I'm planning to use StreamReader to read files, but I'm not sure exactly
how. GEDCOM files are divided into logical components called records,
which are lines starting with '0'. There are different kinds of records,
each with unique tag names and substructures.
The best approach I can think of is to loop through the file, check for
the sequence \n0, check of the next such sequence, and handle each such
block individually, depending on tag name.
This problem must arise in a large number of applications (I can think
of reading mailbox files for instance), so I figured there must be a
conventional way of solving it. Any ideas? I checked out another GEDCOM
library that described itself as "callback-based parser", but I'm not
sure what that means, but figure it could be a lead for how to approach
the problem.
Gustaf
genealogy. Here's a sample of the file format:
http://homepages.rootsweb.ancestry.com/~pmcbride/gedcom/55gcch2.htm#S6
I'm planning to use StreamReader to read files, but I'm not sure exactly
how. GEDCOM files are divided into logical components called records,
which are lines starting with '0'. There are different kinds of records,
each with unique tag names and substructures.
The best approach I can think of is to loop through the file, check for
the sequence \n0, check of the next such sequence, and handle each such
block individually, depending on tag name.
This problem must arise in a large number of applications (I can think
of reading mailbox files for instance), so I figured there must be a
conventional way of solving it. Any ideas? I checked out another GEDCOM
library that described itself as "callback-based parser", but I'm not
sure what that means, but figure it could be a lead for how to approach
the problem.
Gustaf