From: Jamis Buck Date: 2004-11-06T03:10:20+09:00 Subject: Re: [QUIZ] GEDCOM Parser (#6) James Britt wrote: > I would suggest just normalizing the format, such that there is no > mixed-markup or data duplication. value='some /thing/' jut looks wrong > to me; leave out that attribute and using named elements for each chunk: > > > Buck > Jamis Gordon > > > Values then are always child elements, or the text content of the > element if the value does not require any additional semantic demarcation. > > M That's fine, too. But then you have to worry about which nodes you can safely discard the data for. There are some nodes that have children, and *also* have valid, non-duplicated data. Like notes: 1 NOTE blah blah blah blah blah blah blah blah blah 2 CONT blah blah blah blah blah blah blah blah blah The above is really one long string, but because GEDCOM places a limit on line length, long lines are split using child nodes (of type CONT or CONC, depending on whether the newline should be preserved or not). Naturally, a better way to represent this would be to join the NOTE and all CONC or CONT children into one value and store it that way. But that requires logic to handle a special case. If you want to do so, that's fine, but I didn't want to require that for the quiz. :) - Jamis -- Jamis Buck jgb3@email.byu.edu http://www.jamisbuck.org/jamis