9

I have been looking for a GEDCOM parser in JavaScript. Does one exist at the moment? I have found them in many languages but not in JavaScript yet.

ekaqu
  • 2,038
  • 3
  • 24
  • 38
  • GEDCOM parsers are fairly simple to write. I've done a few over the years, including one in Javascript. The basic approach is to create an object for each individual, then add properties to that object for the various data, such a DOB etc. If you are adding something that has its own sub keys, then you can nest objects. – Jeremy J Starcher Jan 26 '13 at 22:53

1 Answers1

6
bfontaine
  • 18,169
  • 13
  • 73
  • 107
peter
  • 41,770
  • 5
  • 64
  • 108
  • 1
    i ended up writing my own. It really wasn't hard. its easy in JS since you can add elements to objects. – ekaqu Feb 16 '13 at 06:23
  • thanks for accepting ekaqu, if you share your code i would like to take a look so that i can compare with my Ruby code, it's never perfect isn't it ? – peter Feb 16 '13 at 10:29
  • 3
    I put it on [github](https://github.com/dcapwell/gedcom.js). There is a modification from normal to check if the tag's value contains an id. This is because Family Tree Legends seems to some times put id there, some times in the id part... i wasn't sure why but it helped me link things properly. – ekaqu Feb 16 '13 at 23:28