GEDCOM to XML — a family tree as structured XML
Convert a GEDCOM (.ged) family tree to XML: people with names and events, families with partners and children, and sources — with encodings and date styles already sorted out.
About this conversion
For software and workflows that expect XML rather than GEDCOM: every person becomes a person element with their name, other names, events (type, readable date, the original GEDCOM date and place), the families they belong to and their notes; families list their partners, children and events; sources follow. IDs are the ones from the file, so the XML can be joined back to the original.
What the XML looks like
A small made-up family, as this page writes it (shortened):
<?xml version="1.0" encoding="UTF-8"?>
<familyTree program="" gedcomVersion="5.5.1">
<people>
<person id="I1" sex="M"><name given="Thomas" surname="Hartley">Thomas Hartley</name>
<event type="Birth" tag="BIRT" date="12 Mar 1871" gedcomDate="12 MAR 1871" place="Leeds, Yorkshire, England"></event>
<event type="Death" tag="DEAT" date="about 1932" gedcomDate="ABT 1932"></event><spouseIn family="F1"/></person>
<person id="I3" sex="F"><name given="Alice" surname="Hartley">Alice Hartley</name>
<event type="Birth" tag="BIRT" date="4 Jun 1899" gedcomDate="4 JUN 1899" place="Leeds, Yorkshire, England"></event>
<childOf family="F1" relation="birth"/></person>
</people>
<families>
<family id="F1"><partner ref="I1"/><partner ref="I2"/><child ref="I3"/>
<event type="Marriage" tag="MARR" date="1897" gedcomDate="1897" place="Leeds, Yorkshire, England"></event></family>
</families>
<sources>…</sources>
</familyTree>How it is laid out
Three lists: people, families and sources. A person points to the families they are a partner in (spouseIn) and the one they were born into (childOf); a family lists its partners and children by ID. Every event keeps the readable date, the date exactly as the GEDCOM wrote it, and the place — so “ABT 1932” stays “about 1932” and nothing is lost on the way.
Reading it in other tools
XSLT, a few lines of Python or PowerShell, or a database import can read it directly. The IDs are the ones from your .ged (I1, F1), so any result can always be matched back to the original file.
Just want to look inside it?
The same tool without converting anything: open the file and read it.
The same tree, other ways
The tree stays open after it is read, so the format is picked at the end: the same file can leave here as PDF, Word (.docx), Excel (.xlsx), CSV, HTML, TXT, JSON, PNG, JPG or SVG. Before that you can walk through it person by person, print it as a chart or a book, find people who were entered twice, hide the living, and correct names and dates.