Difference between revisions of "Gramps XML"
m (→Gramps XML Resources: note limits of database version compatibility) |
m (links) |
||
| (22 intermediate revisions by 5 users not shown) | |||
| Line 12: | Line 12: | ||
!Imports XML schema | !Imports XML schema | ||
!Database schema | !Database schema | ||
| − | !Imports | + | !Imports database schema |
!Example | !Example | ||
!Changes/Note | !Changes/Note | ||
|- | |- | ||
| master | | master | ||
| − | | no change against | + | | no change against 6.0 yet |
| >= 1.0.0 - best 1.7 | | >= 1.0.0 - best 1.7 | ||
| − | | | + | | 21 |
| − | | | + | | 13-21 |
| Unreleased <br />[{{Code Browser}}/tree/master/example/gramps/example.gramps example.gramps] | | Unreleased <br />[{{Code Browser}}/tree/master/example/gramps/example.gramps example.gramps] | ||
| Unreleased | | Unreleased | ||
| Line 28: | Line 28: | ||
{| class="wikitable sortable" | {| class="wikitable sortable" | ||
| − | !Gramps release | + | ![[Previous_releases_of_Gramps|Gramps release]] |
!XML schema | !XML schema | ||
!Imports XML schema | !Imports XML schema | ||
| − | !Database | + | !Database schema |
| − | !Example | + | !Imports database schema |
| + | ![[Example.gramps|Example.gramps]] | ||
!Changes/Note | !Changes/Note | ||
| + | |- | ||
| + | | [[Template:Releases/6.0.5|6.0.x]] | ||
| + | | [https://gramps-project.org/xml/1.7.2/ 1.7.2] | ||
| + | | >= 1.0.0 - 1.7 | ||
| + | | 21 | ||
| + | | 13-21 | ||
| + | |[{{Code Browser}}/tree/maintenance/gramps60/example/gramps/example.gramps file] ([https://raw.githubusercontent.com/gramps-project/gramps/refs/heads/maintenance/gramps60/example/gramps/example.gramps view]) | ||
| + | | | ||
| + | * Serialization format changed from pickled BLOBs to JSON. | ||
| + | |- | ||
| + | | 5.2.x | ||
| + | | 1.7.0 - 1.7.1 | ||
| + | | >= 1.0.0 - 1.7 | ||
| + | | 20 | ||
| + | | 13-20 | ||
| + | |[{{Code Browser}}/tree/maintenance/gramps52/example/gramps/example.gramps file] ([https://raw.githubusercontent.com/gramps-project/gramps/refs/heads/maintenance/gramps52/example/gramps/example.gramps view]) | ||
| + | | | ||
| + | * Added citations to event references | ||
| + | * DB-API (SQLite) is default backend | ||
| + | * BSDDB only for conversions to SQLite | ||
|- | |- | ||
| 5.1.x | | 5.1.x | ||
| Line 39: | Line 60: | ||
| >= 1.0.0 - 1.7 | | >= 1.0.0 - 1.7 | ||
| 19 | | 19 | ||
| − | |[{{Code Browser}}/tree/maintenance/gramps51/example/gramps/example.gramps] | + | | 13-19 |
| + | |[{{Code Browser}}/tree/maintenance/gramps51/example/gramps/example.gramps file] ([https://raw.githubusercontent.com/gramps-project/gramps/refs/heads/maintenance/gramps51/example/gramps/example.gramps view]) | ||
| | | | ||
* DB-API (SQLite) is default backend | * DB-API (SQLite) is default backend | ||
| Line 48: | Line 70: | ||
| >= 1.0.0 - 1.7 | | >= 1.0.0 - 1.7 | ||
| 19 | | 19 | ||
| − | |[{{Code Browser}}/tree/maintenance/gramps50/example/gramps/example.gramps] | + | | 13-19 |
| + | |[{{Code Browser}}/tree/maintenance/gramps50/example/gramps/example.gramps file] ([https://raw.githubusercontent.com/gramps-project/gramps/refs/heads/maintenance/gramps50/example/gramps/example.gramps view]) | ||
| | | | ||
* Database backends become plugins | * Database backends become plugins | ||
| Line 54: | Line 77: | ||
* DB-API (SQLite) is tested as viable replacement | * DB-API (SQLite) is tested as viable replacement | ||
|- | |- | ||
| − | | 4.2.x | + | | [[Template:Releases/4.2.8|4.2.x]] |
| − | | 1.7.0 - 1.7.1 | + | | [https://gramps-project.org/xml/1.7.0/ 1.7.0] - [https://gramps-project.org/xml/1.7.1/ 1.7.1] |
| >= 1.0.0 - 1.7 | | >= 1.0.0 - 1.7 | ||
| 18 | | 18 | ||
| − | |[{{Code Browser}}/tree/maintenance/gramps42/example/gramps/example.gramps] | + | | 13-18 |
| + | |[{{Code Browser}}/tree/maintenance/gramps42/example/gramps/example.gramps file] ([https://raw.githubusercontent.com/gramps-project/gramps/refs/heads/maintenance/gramps42/example/gramps/example.gramps view]) | ||
| | | | ||
* Added PlaceNames (with Date and Language) Place | * Added PlaceNames (with Date and Language) Place | ||
| Line 66: | Line 90: | ||
| >= 1.0.0 - best 1.5.1 | | >= 1.0.0 - best 1.5.1 | ||
| 17 | | 17 | ||
| − | |[{{Code Browser}}/tree/maintenance/gramps41/example/gramps/example.gramps] | + | | 13-17 |
| + | |[{{Code Browser}}/tree/maintenance/gramps41/example/gramps/example.gramps file] ([https://raw.githubusercontent.com/gramps-project/gramps/refs/heads/maintenance/gramps41/example/gramps/example.gramps view]) | ||
| | | | ||
* added Tags to Event, Place, Repository, Source, and Citation | * added Tags to Event, Place, Repository, Source, and Citation | ||
| Line 77: | Line 102: | ||
| >= 1.0.0 - best 1.4.0 | | >= 1.0.0 - best 1.4.0 | ||
|16 | |16 | ||
| − | |[{{Code Browser}}/tree/maintenance/gramps40/example/gramps/example.gramps] | + | |13-16 |
| + | |[{{Code Browser}}/tree/maintenance/gramps40/example/gramps/example.gramps file] ([https://raw.githubusercontent.com/gramps-project/gramps/refs/heads/maintenance/gramps40/example/gramps/example.gramps view]) | ||
| - | | - | ||
|- | |- | ||
| Line 84: | Line 110: | ||
| >= 1.0.0 - best 1.4.0 | | >= 1.0.0 - best 1.4.0 | ||
|16 | |16 | ||
| − | |[{{Code Browser}}/tree/maintenance/gramps34/example/gramps/example.gramps] | + | |13-16 |
| + | |[{{Code Browser}}/tree/maintenance/gramps34/example/gramps/example.gramps file] ([https://raw.githubusercontent.com/gramps-project/gramps/refs/heads/maintenance/gramps34/example/gramps/example.gramps view]) | ||
| | | | ||
* Citations support | * Citations support | ||
| Line 94: | Line 121: | ||
| >= 1.0.0 - best 1.3.0 | | >= 1.0.0 - best 1.3.0 | ||
|15 | |15 | ||
| − | |[{{Code Browser}}/tree/maintenance/gramps33/example/gramps/example.gramps] | + | |13-15 (3.3.1) |
| + | |[{{Code Browser}}/tree/maintenance/gramps33/example/gramps/example.gramps file] ([https://raw.githubusercontent.com/gramps-project/gramps/refs/heads/maintenance/gramps33/example/gramps/example.gramps view]) | ||
| | | | ||
* Added new field "locality" to the Place schema | * Added new field "locality" to the Place schema | ||
| Line 107: | Line 135: | ||
|1.3.0 | |1.3.0 | ||
| >= 1.0.0 - best 1.1.0 | | >= 1.0.0 - best 1.1.0 | ||
| − | | | + | |14 |
| − | |[{{Code Browser}}/tree/maintenance/gramps31/example/gramps/example.gramps] | + | |13-14 |
| + | |[{{Code Browser}}/tree/maintenance/gramps31/example/gramps/example.gramps file] ([https://raw.githubusercontent.com/gramps-project/gramps/refs/heads/maintenance/gramps31/example/gramps/example.gramps view]) | ||
| | | | ||
* Added lat/long to places | * Added lat/long to places | ||
| Line 115: | Line 144: | ||
|1.2.0 | |1.2.0 | ||
| >= 1.1.0 | | >= 1.1.0 | ||
| − | |14 | + | |13-14 (depends on version) |
| − | |[{{Code Browser}}/tree/maintenance/gramps30/example/gramps/example.gramps] | + | | [https://gramps.discourse.group/t/import-convert-old-database/3768/ 9-14 (3.0.4)] |
| + | |[{{Code Browser}}/tree/maintenance/gramps30/example/gramps/example.gramps file] ([https://raw.githubusercontent.com/gramps-project/gramps/refs/heads/maintenance/gramps30/example/gramps/example.gramps view]) | ||
| | | | ||
* added newyear to Dates | * added newyear to Dates | ||
| Line 124: | Line 154: | ||
|1.1.0-1.1.4 | |1.1.0-1.1.4 | ||
| >= 0.0.0 | | >= 0.0.0 | ||
| − | | | + | |9-12 (depends on version) |
| − | |[{{Code Browser}}/tree/maintenance/gramps22/example/gramps/data.gramps] | + | |5-12 (2.2.10) |
| + | |[{{Code Browser}}/tree/maintenance/gramps22/example/gramps/data.gramps file] ([https://raw.githubusercontent.com/gramps-project/gramps/refs/heads/maintenance/gramps22/example/gramps/example.gramps view]) | ||
| | | | ||
|- | |- | ||
| − | |2.0. | + | | 2.0.6-10 |
| − | |1.0.0 | + | | 1.0.0 |
| >= 0.0.0 | | >= 0.0.0 | ||
| − | | | + | | 8 |
| − | |[{{Code Browser}}/tree/maintenance/gramps20/gramps2/example/gramps/data.gramps] | + | | 1-8 |
| − | | | + | |[{{Code Browser}}/tree/maintenance/gramps22/example/gramps/data.gramps file] |
| − | * changed name formats | + | | |
| + | |- | ||
| + | | 2.0.5 | ||
| + | | 1.0.0 | ||
| + | | >= 0.0.0 | ||
| + | | 7 | ||
| + | | 1-7 | ||
| + | |[{{Code Browser}}/tree/maintenance/gramps22/example/gramps/data.gramps file] | ||
| + | | | ||
| + | |- | ||
| + | | 2.0.1-4 | ||
| + | | 1.0.0 | ||
| + | | >= 0.0.0 | ||
| + | | 6 | ||
| + | | 1-6 | ||
| + | |[{{Code Browser}}/tree/maintenance/gramps22/example/gramps/data.gramps file] | ||
| + | | | ||
| + | |- | ||
| + | | [[Template:Releases/1.0.0|2.0.0]] | ||
| + | | [https://gramps-project.org/xml/1.0.0/ 1.0.0] | ||
| + | | >= 0.0.0 | ||
| + | | 5 | ||
| + | | 1-5 | ||
| + | |[{{Code Browser}}/tree/maintenance/gramps20/gramps2/example/gramps/data.gramps file] | ||
| + | | * changed name formats | ||
|- | |- | ||
| − | |1.0.x | + | |[[Template:Releases/1.0.0|1.0.x]] |
|no official version (0.0.0) | |no official version (0.0.0) | ||
| - | | - | ||
| | | | ||
| − | |[{{Code Browser}}/tree/maintenance/gramps10/example/gramps/data.gramps] | + | | |
| + | |[{{Code Browser}}/tree/maintenance/gramps10/example/gramps/data.gramps file] | ||
|(Install [https://github.com/gramps-project/gramps/releases/tag/v2.2.10 Gramps 2.2.10] to import and convert old beta Gramps XML backups - see [[Gramps_Old_database]] & issue {{bug|6129}}) | |(Install [https://github.com/gramps-project/gramps/releases/tag/v2.2.10 Gramps 2.2.10] to import and convert old beta Gramps XML backups - see [[Gramps_Old_database]] & issue {{bug|6129}}) | ||
|- | |- | ||
| Line 147: | Line 203: | ||
| Unsupported | | Unsupported | ||
| Unsupported | | Unsupported | ||
| + | | | ||
| Unsupported | | Unsupported | ||
| | | | ||
| Line 177: | Line 234: | ||
* GrampsXMLview was a number of PHP scripts in combination with a Gramps XML database (Sjoerd van Staveren). [https://web.archive.org/web/20120220103003/http://www.gramps.van-staveren.net/ 2012 www.gramps.van-staveren.net Internet Archive] | * GrampsXMLview was a number of PHP scripts in combination with a Gramps XML database (Sjoerd van Staveren). [https://web.archive.org/web/20120220103003/http://www.gramps.van-staveren.net/ 2012 www.gramps.van-staveren.net Internet Archive] | ||
* [https://github.com/claws/gramps2gource gramps2gource] for blurring the line between Genealogy and Software Configuration Management visualisation. | * [https://github.com/claws/gramps2gource gramps2gource] for blurring the line between Genealogy and Software Configuration Management visualisation. | ||
| − | * ... | + | * [https://betty.readthedocs.io/latest/index.html Betty] generates a ready-to-publish static website from Gramps XML genealogy archives |
==See also== | ==See also== | ||
| + | * [https://github.com/gramps-project/gramps/blob/master/data/grampsxml.dtd grampsxml.dtd] master branch file on GitHub (Document Type Definition) | ||
| + | * [https://github.com/gramps-project/gramps/blob/master/data/grampsxml.rng grampsxml.rng] master branch file on GitHub (RELAX NG schema language in XML syntax) | ||
* [https://gramps.discourse.group/t/auxiliary-xml-format-documentation/2800 Auxiliary XML files in Gramps]: | * [https://gramps.discourse.group/t/auxiliary-xml-format-documentation/2800 Auxiliary XML files in Gramps]: | ||
| − | + | :.gramps/: | |
| − | * | + | :* report_options.xml - report settings: |
| − | * | + | :* books.xml - Books |
| − | * | + | :* tool_options.xml |
| + | :* [[Calendar_tools_holidays#format_of_holidays.xml|holidays.xml]] - holiday sets or country calendars | ||
| + | :* recent-files-gramps.xml - | ||
| + | :* fan_chart.xml | ||
| + | :* place_formats.xml | ||
| + | :.gramps//gramps52/ | ||
| + | :* custom_filters.xml - filters | ||
* [[Generate XML]] | * [[Generate XML]] | ||
* Tutorial: [[Customize_reports_with_XML_tool|Customize reports with XML tool]] | * Tutorial: [[Customize_reports_with_XML_tool|Customize reports with XML tool]] | ||
| Line 190: | Line 255: | ||
* [[Gramps and GEDCOM]] | * [[Gramps and GEDCOM]] | ||
* [[Database_Formats]] | * [[Database_Formats]] | ||
| + | * wiki "Just Solve the File Format Problem" - [http://fileformats.archiveteam.org/wiki/Genealogical_data Genealogical data] file formats | ||
* [[Gramps Old database]] | * [[Gramps Old database]] | ||
* [[Previous releases of Gramps]] | * [[Previous releases of Gramps]] | ||
Latest revision as of 22:07, 12 October 2025
Gramps XML is the Extensible Markup Language (XML) format designed for storing Gramps data. The goal is to have a fully portable, human- and machine-readable XML format so that the data can be read and written without any loss. In addition, XML format allows for smaller files (if compressed) and for using the version control system for tracking the changes (if uncompressed).
The reason XML is not used by Gramps as the working database ("internal") format is performance, specifically memory considerations.
Contents
Gramps XML Resources
Starting with Gramps XML 1.0 Each revision of Gramps XML has its own resource page, with references to that version's DTD and RELAX NG schema. |
| Gramps release | XML schema | Imports XML schema | Database schema | Imports database schema | Example | Changes/Note |
|---|---|---|---|---|---|---|
| master | no change against 6.0 yet | >= 1.0.0 - best 1.7 | 21 | 13-21 | Unreleased example.gramps |
Unreleased |
Note Commencing with Gramps 3.1.2 all official versions of Gramps XML files can be imported. However, a warning will be given on import of 1.0.0 XML.[1] |
| Gramps release | XML schema | Imports XML schema | Database schema | Imports database schema | Example.gramps | Changes/Note |
|---|---|---|---|---|---|---|
| 6.0.x | 1.7.2 | >= 1.0.0 - 1.7 | 21 | 13-21 | file (view) |
|
| 5.2.x | 1.7.0 - 1.7.1 | >= 1.0.0 - 1.7 | 20 | 13-20 | file (view) |
|
| 5.1.x | 1.7.0 - 1.7.1 | >= 1.0.0 - 1.7 | 19 | 13-19 | file (view) |
|
| 5.0.x | 1.7.0 - 1.7.1 | >= 1.0.0 - 1.7 | 19 | 13-19 | file (view) |
|
| 4.2.x | 1.7.0 - 1.7.1 | >= 1.0.0 - 1.7 | 18 | 13-18 | file (view) |
|
| 4.1.x | 1.6.0 | >= 1.0.0 - best 1.5.1 | 17 | 13-17 | file (view) |
|
| 4.0.x | 1.5.0 - 1.5.1 | >= 1.0.0 - best 1.4.0 | 16 | 13-16 | file (view) | - |
| 3.4.x | 1.5.0 - 1.5.1 | >= 1.0.0 - best 1.4.0 | 16 | 13-16 | file (view) | |
| 3.3.x | 1.4.0 | >= 1.0.0 - best 1.3.0 | 15 | 13-15 (3.3.1) | file (view) |
|
| 3.1.x | 1.3.0 | >= 1.0.0 - best 1.1.0 | 14 | 13-14 | file (view) |
|
| 3.0.x | 1.2.0 | >= 1.1.0 | 13-14 (depends on version) | 9-14 (3.0.4) | file (view) |
|
| 2.2.x | 1.1.0-1.1.4 | >= 0.0.0 | 9-12 (depends on version) | 5-12 (2.2.10) | file (view) | |
| 2.0.6-10 | 1.0.0 | >= 0.0.0 | 8 | 1-8 | file | |
| 2.0.5 | 1.0.0 | >= 0.0.0 | 7 | 1-7 | file | |
| 2.0.1-4 | 1.0.0 | >= 0.0.0 | 6 | 1-6 | file | |
| 2.0.0 | 1.0.0 | >= 0.0.0 | 5 | 1-5 | file | * changed name formats |
| 1.0.x | no official version (0.0.0) | - | file | (Install Gramps 2.2.10 to import and convert old beta Gramps XML backups - see Gramps_Old_database & issue 6129) | ||
| 0.0.x | beta software (0.0.0) | Unsupported | Unsupported | Unsupported |
Note: To convert an old Gramps XML file you could use VirtualBox or Vmware and the old lgenealogy images from: |
DTD generation
Tool like xml2dtd could help people not familiar with DTD grammar by generating a DTD file from a XML file. New content on Gramps XML could be tested with the tool and be merged on current Gramps DTD.
RELAX NG generation
Tools like trang or NekoDTD could help to convert a Gramps DTD file to a RELAX NG file. Some others tools and up-to-date informations are listed on this page.
Validating Gramps XML file
To validate the Gramps XML file against its DTD, use xmllint program (comes with the libxml2-utils package):
xmllint --noout filename.gramps
|
If the Gramps XML file does not validate this indicates an error in either the DTD or the XML Writer. |
Parsing Gramps XML file
- XSLT scripts: gramps exhibit (Michiel Nauta), Ancestors.xsl, Birthday.xsl (Gramps 1.x), Tellico scripts, lxml gramplet, Print Notes, etc ... see XPaths.
- A sample of standalone script (Adam Sampson) which parses a Gramps XML file for drawing a family tree.
- Gramps-php-exporter
- A Joomla! component/module for uploading the Gramps XML database and for showing genealogical information and overviews.
- PhpGedView supports simple output to Gramps XML file format for the Clippings Cart and has an option to download entire Gedcom in Gramps XML form as well as being able to retrieve raw data from the SOAP web service in Gramps XML format. Still a partial support on version 4.3.0.
- Greasemonkey scripts (Michiel Nauta)
- GrampsXMLview was a number of PHP scripts in combination with a Gramps XML database (Sjoerd van Staveren). 2012 www.gramps.van-staveren.net Internet Archive
- gramps2gource for blurring the line between Genealogy and Software Configuration Management visualisation.
- Betty generates a ready-to-publish static website from Gramps XML genealogy archives
See also
- grampsxml.dtd master branch file on GitHub (Document Type Definition)
- grampsxml.rng master branch file on GitHub (RELAX NG schema language in XML syntax)
- Auxiliary XML files in Gramps:
- .gramps/:
- report_options.xml - report settings:
- books.xml - Books
- tool_options.xml
- holidays.xml - holiday sets or country calendars
- recent-files-gramps.xml -
- fan_chart.xml
- place_formats.xml
- .gramps//gramps52/
- custom_filters.xml - filters
- Generate XML
- Tutorial: Customize reports with XML tool
- GEDCOM
- Gramps and GEDCOM
- Database_Formats
- wiki "Just Solve the File Format Problem" - Genealogical data file formats
- Gramps Old database
- Previous releases of Gramps
