# XML application issue

**URL:** <https://gramps.discourse.group/t/xml-application-issue/8878>\
**Category:** Development\
**Tags:** third-party-addon, gedcom, data-import\
**Created:** [December 1, 2025, 8:02pm UTC](https://gramps.discourse.group/t/xml-application-issue/8878 "2025-12-01T20:02:21Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![jj0192](https://avatars.discourse-cdn.com/v4/letter/j/f04885/32.png) [@jj0192](https://gramps.discourse.group/u/jj0192)\
**Post date:** [December 1, 2025, 8:02pm UTC](https://gramps.discourse.group/t/xml-application-issue/8878/1 "2025-12-01T20:02:21Z")

</div>

I am currently working on a direct gedcom to xml converter for gramps. I have made it extremely far into the process however, I can not see to get the people view to show the dates event though there are event birth and death dates.

here is an example of the xml:

```python
"<person handle="\_d31f8dfbb2c547b8" id="I00600" change="1764616906">
      <name>
        <first>Charles Willis</first>
        <surname>Malin</surname>
      </name>
      <gender>M</gender>
      <eventref hlink="\_a6bc51a5a74247b2" role="Birth" />
      <eventref hlink="\_f58cd2f3ee89493c" role="Death" />
      <eventref hlink="\_f63b0835ec214ae5" role="Deceased" />
      <eventref hlink="\_544f5ffc22754d24" role="Resident" />
      <eventref hlink="\_0fd344fb1e2744e0" role="Resident" />
      <eventref hlink="\_394fbd7d28344e8b" role="Resident" />
      <eventref hlink="\_9aef26e227e84b0a" role="Resident" />
      <eventref hlink="\_0177cc84d0b247d7" role="Resident" />
      <eventref hlink="\_e923326de201440f" role="Resident" />
      <eventref hlink="\_64934db6297f4453" role="Resident" />
      <eventref hlink="\_06ff3ab246294b0f" role="Resident" />
      <eventref hlink="\_bbb9e1ec6b2e4a77" role="Resident" />
      <eventref hlink="\_defa9278d8014b30" role="Participant" />
      <eventref hlink="\_f29293a648a6443c" role="Participant" />
      <eventref hlink="\_4945ee154fa64ad7" role="Participant" />
      <attribute type="FamilySearch" value="LZD7-PH7" />
      <attribute type="\_UID" value="23438A67B22E0B498D770B42B07B8B17A9C8" />
      <parentin hlink="\_e43943537df144f5" />
    </person>"

"<event handle="_a6bc51a5a74247b2" id="E03349" change="1764616906">
      <type>Birth</type>
      <dateval val="1885-09" />
      <place hlink="_0694b4c232264208" />
    </event>"

"<event handle="_f58cd2f3ee89493c" id="E03350" change="1764616906">
      <type>Death</type>
      <dateval val="1951-07-28" />
      <place hlink="_373a3a7db4204adc" />
    </event>"

```

It would seem that the import gets the events and other data its just not displaying the dates in the People Treeview. can someone help me with what needs to be in the XML to show this correctly?

 ![image](https://global.discourse-cdn.com/free1/uploads/gramps/original/2X/f/f8e0180326b6c5a2d3600e6a0ad5c740438a44d1.png)

---

<div class="post-metadata">

**Author:** ![emyoulation](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/emyoulation/32/67_2.png) [@emyoulation](https://gramps.discourse.group/u/emyoulation)\
**Post date:** [December 1, 2025, 8:23pm UTC](https://gramps.discourse.group/t/xml-application-issue/8878/2 "2025-12-01T20:23:06Z")

</div>

You probably need to set the [Event Role](https://gramps-project.org/wiki/index.php/Gramps_Glossary#event_role) to `Primary` too. (Family events need a `Family` Role.)

The Birth and Death dates displayed in the view are “[fallback event](https://gramps-project.org/wiki/index.php/Gramps_Glossary#fallback)” calculations. (So, if you only had a Burial event with a Primary role, then italicized burial date would be displayed.)

To verify, you could edit the imported event for the Person. (Open the Event editor from the Person View or Person Editor. Opening the editor from an Event view will not give acess to the Roles.) If the Role is `Unknown`, that is _ **always** _ a problem.

---

<div class="post-metadata">

**Author:** ![emyoulation](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/emyoulation/32/67_2.png) [@emyoulation](https://gramps.discourse.group/u/emyoulation)\
**Post date:** [December 1, 2025, 8:45pm UTC](https://gramps.discourse.group/t/xml-application-issue/8878/3 "2025-12-01T20:45:13Z")

</div>

BTW, the [Import Text](https://gramps-project.org/wiki/index.php/Addon:Import_Text_Gramplet) gramplet addon might make a good reference code. It imports most of the basics. (Although it only creates Sources, no Citations.)

Also the current GEDCOM importer plugin leverages Preferences settings for Tagging and Sourcing records during import. However, this unfortunately loses the modification date info for all those records. Which is a definite loss and drawback in merging comparisons. (If you’re importing/merging/syncing/updating from a file exported from the same database with records that are older, it allows your importer to intelligently offer to not revert updated records to old data.)

---

<div class="post-metadata">

**Author:** ![jj0192](https://avatars.discourse-cdn.com/v4/letter/j/f04885/32.png) [@jj0192](https://gramps.discourse.group/u/jj0192)\
**Post date:** [December 1, 2025, 9:21pm UTC](https://gramps.discourse.group/t/xml-application-issue/8878/4 "2025-12-01T21:21:08Z")

</div>

> [@emyoulation](#):
>
> You probably need to set the [Event Role](https://gramps-project.org/wiki/index.php/Gramps_Glossary#event_role) to `Primary` too. (Family events need a `Family` Role.)
> 
> The Birth and Death dates displayed in the view are “[fallback event](https://gramps-project.org/wiki/index.php/Gramps_Glossary#fallback)” calculations. (So, if you only had a Burial event with a Primary role, then italicized burial date would be displayed.)
> 
> To verify, you could edit the imported event for the Person. (Open the Event editor from the Person View or Person Editor. Opening the editor from an Event view will not give acess to the Roles.) If the Role is `Unknown`, that is _ **always** _ a problem.

You are Awesome, that is exactly what it was, except for Unknown mine had birth as the role. Once I switched it to primary it worked!!! Same thing with Death.

---

<div class="post-metadata">

**Author:** ![emyoulation](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/emyoulation/32/67_2.png) [@emyoulation](https://gramps.discourse.group/u/emyoulation)\
**Post date:** [December 1, 2025, 11:36pm UTC](https://gramps.discourse.group/t/xml-application-issue/8878/5 "2025-12-01T23:36:28Z")

</div>

> [@jj0192](#):
>
> except for Unknown mine had birth as the role

Ahh. That should straight-forward to find where your XML writer is setting the Role to the event type.

But… if you are continuing on with the database (instead of tweaking the writer and importing an updated XML into a blank tree), then you will want to do a bit of housekeeping.

That import would have added some custom types to the bottom of the **Role** pop-up menu selection. And you will want to make certain those nonstandard roles are not in use by any Event. And then flush them out of the list.

The easiest way to do that is with the [Types Cleanup](https://www.gramps-project.org/wiki/index.php/Addon:Types_Cleanup_Tool) addon tool by @prculley.

---

<div class="post-metadata">

**Author:** ![jj0192](https://avatars.discourse-cdn.com/v4/letter/j/f04885/32.png) [@jj0192](https://gramps.discourse.group/u/jj0192)\
**Post date:** [December 2, 2025, 12:30am UTC](https://gramps.discourse.group/t/xml-application-issue/8878/6 "2025-12-02T00:30:36Z")

</div>

thanks I will look into actually cleaning up the types I will just make a list of appropriate ones and page start a mapping process.

---

<div class="post-metadata">

**Author:** ![StoltHD](https://avatars.discourse-cdn.com/v4/letter/s/db5fbb/32.png) [@StoltHD](https://gramps.discourse.group/u/StoltHD)\
**Post date:** [December 3, 2025, 6:54pm UTC](https://gramps.discourse.group/t/xml-application-issue/8878/7 "2025-12-03T18:54:06Z")

</div>

The whole point of being able to use custom roles just that, to be able to define real roles to any event participation… to use the actual work title of a person in an work event etc.

It’s actually way over time that these limitations get changes…

---

<div class="post-metadata">

**Author:** ![emyoulation](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/emyoulation/32/67_2.png) [@emyoulation](https://gramps.discourse.group/u/emyoulation)\
**Post date:** [December 3, 2025, 8:18pm UTC](https://gramps.discourse.group/t/xml-application-issue/8878/8 "2025-12-03T20:18:06Z")

</div>

> [@StoltHD](#):
>
> whole point of being able to use custom roles just that, to be able to define real roles to any event participation

True. But the “Primary” (or “Family”) is the person (or 2 persons) having the central Role be implicit in the Event. So that you do not need to explicitly define Roles for each type of Event. Since _most_ Events only have a single Person specified, it cuts the data entry burden by nearly half and eliminates the fussiness of mismatching roles to event.

This allows a lot more flexibility in Gramps to adapt for relationship, pronouns, gender, plurals and tense across various languages.

---

<div class="post-metadata">

**Author:** ![StoltHD](https://avatars.discourse-cdn.com/v4/letter/s/db5fbb/32.png) [@StoltHD](https://gramps.discourse.group/u/StoltHD)\
**Post date:** [December 3, 2025, 8:35pm UTC](https://gramps.discourse.group/t/xml-application-issue/8878/9 "2025-12-03T20:35:10Z")

</div>

Problem is that any other “custom” will not be accounted for… thereby an arbitrary limitation.

All roles and types should be weighted the same, have the same rules, be included in the same matter…

This is another reason I do not use Gramps for anything but archive…

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/gramps/original/1X/2ac1e712b7adf612e31ca08a55419f4cf37c0158.png) [@system](https://gramps.discourse.group/u/system)\
**Post date:** [January 2, 2026, 8:35pm UTC](https://gramps.discourse.group/t/xml-application-issue/8878/10 "2026-01-02T20:35:22Z")

</div>

Closed on January 2, 2026, 8:35pm UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
