A genogram is an extended family tree diagram that shows information about each person or each relationship.

The XML data is basically a list of people. The code creates an instance of a Person class to represent each node. Each Person has a number of properties initialized from the XML attributes:

There are converters that convert an attribute value into a brush color or Path Geometry, to be added to the Node representing the person.

The SetupDiagram method creates all of the link data, represented by the Relationship class. Relationships that are of the "Marriage" category link mothers with fathers. Relationships of "ParentChild" category link a marriage for each child. Note that the FromNode of Links are not the Node that is the mother or the father, but a special Node that is a Link label on a marriage Link between the mother and the father.