Import a Moodle Glossary

Moodle glossary imports need a file in XML format. Here is how I did it for Moodle 3.8

First create a glossary with two entries. Export as XML and you have an example of the file you need.

I used a simple text editor to examine the file. Each entry in the table is sandwiched between entry tags

<?xml version="1.0" encoding="UTF-8"?>

The XML is nicely formatted to help a human reader but it is not necessary. We can create every entry between entry tags as a single line.

There are two bits of information we must supply for a simple glossary, the word and its definition. There are three bits of XML to add, the section before the definition, the section between the word and definition and the section after the definition. Here is a sample entry we must replicate.


And the last section of the XML file is


Create a 5 column spreadsheet. Column 1 is all the XML before the word abandon ie <ENTRY> <CONCEPT>, all on one line. Column 2 is the entry (abandon), column 3 is the XML starting with </CONCEPT> up to <DEFINITION>, column 4 is the definition, then the rest of the XML up to </ENTRY>

Column 6 uses a formula to concatenate columns 1 to 5. Add your words and definitions to columns 2 and 4 and you are good to go.

Now copy all of column 6 to replace the area between the entries tag in your exported file. And you have an XML file ready to import