I would strongly suggest first designing the genealogical object model
from the GEDCOM definitions (and other sources) without considering XML
or DOM at all. You need to first get a good model of the information you
want to represent in a computer (usually called a DomainModel) before
considering technological/application constraints on it. After you have
the model you can consider how that information could be best constructed
from an XML/GEDCOM encoding.
The GEDCOM spec has a very specific model behind it, so you can
decide whether to use that model, a subset of it, or some improvement to
it. There is a lot of stuff in there so it may take a while to get a
good DomainModel out of it and then implement that model in Java. After
that, the XML should be very easy.
Last time I checked (maybe a year or two ago), nobody had a
publically available GEDCOM object model or implementation in Java, but
maybe that has changed. I spent several days starting the process of
building a model but got called off to other tasks [not sure where my
notes are].
If you have not already, you may want to look at Martin Fowler's Analysis
Patterns book or any of the three Amigos' books (Booch, Rumbaugh,
Jacobson). Full references for these books are at:
http://www.chimu.com/projects/mondo/links.html
--Mark
mark.fussell@chimu.com