Sample Family Tree XML

To get you started with your own family tree, you can download a Sample Family Tree XML file.

If you have Internet Explorer as your default browser, then once you have downloaded it simply double-click on it to see a syntax-coloured listing of the file. This will be similar to the listing shown below (which is from Visual Studio 2010), except the colours will be different:



Sample XML



The listing shows many of the features of the XML syntax.

People are grouped into individual families, under the <family> tag. The first family is the "prime family", i.e. the family whose family tree this is.

People can appear in more than one family. Thus, John Smith appears as the husband in the Prime Family and also as a son in his birth family. The name attribute (name="John") is mandatory; all other attributes are optional. In this case, John's birth family entry also gives his date of birth and place of birth.

Maiden Names

Janet Smith was born Janet Jones. She appears in the Prime Family and also in her birth family. In this case, it is the maiden="Jones" attribute that ties the two together. Husbands can also have the maiden attribute, to cope with the case where men change their name on marriage.

Dates

Any person (i.e. <husband>, <wife>, <son> or <daughter>) can have optional date-of-birth and date-of-death entries using the <dob> and <dod> attributes. If a person appears in more than one family, you can add these attributes to any of their tags, e.g. for a man, to either the <husband> tag or the <son> tag, but we recommend you use the birth family entry.

If both tags contain a particular attribute, this does not matter but if the dates are different the second date will be used. The contents of these attributes are just text: you can put "1900", "Jan 1900", "01-01-1990" as you wish. But please remember that date-of-birth is often used as a security question, so just putting the year is safer.

Places

Any person can have optional place-of-birth and place-of-death entries using the <pob> and <pod> attributes.

Duplicate Names

As you build up your family tree it is quite likely you will have people with the same names, e.g. Mary Smith has a great-aunt who is also called Mary Smith. The software needs to distinguish between them, otherwise you will get "circular references" (see below). Simply choose one of the Mary entries and put a trailing full stop on their forename, e.g. name="Mary.". When the software displays names, it trims off any trailing periods. In the meantime, it is enough to make the two Marys unique.

If you have three Marys, leave one as name="Mary", change one to name="Mary." and one to name="Mary..".

Circular References

If you miss the situation where two people in your tree have the same name, you will get a circular reference. You can see this in the rendered family tree because some of the parent-to-child lines go upwards. It should be fairly easy to see which name is the problem. However, it is sensible to add people to the tree a few at a time, rather than en masse.

Orphans

Every family in the XML file must be somehow related to the Prime Family. If you add a family that is not linked to the tree, the software will not be able to render the tree at all. Simply remove any recent families from the tree one-by-one until you find the problem family.