Change the order in output xml: entry(comment, variants, labels)

This commit is contained in:
Ozbolt Menegatti 2019-11-20 19:09:12 +01:00
parent 1039a686cc
commit be4c8d0bf1

View File

@ -33,12 +33,6 @@ def export_entry(entry):
grammar.appendChild(grammar_category) grammar.appendChild(grammar_category)
head.appendChild(grammar) head.appendChild(grammar)
comment = doc.createElement("comment")
comment.textContent = entry.comment
head.appendChild(comment)
head.appendChild(_export_label_list(doc, entry.labels))
variants = doc.createElement("variantList") variants = doc.createElement("variantList")
head.appendChild(variants) head.appendChild(variants)
@ -46,6 +40,12 @@ def export_entry(entry):
variant = doc.createElement("variant") variant = doc.createElement("variant")
variant.textContent = v variant.textContent = v
variants.appendChild(variant) variants.appendChild(variant)
head.appendChild(_export_label_list(doc, entry.labels))
comment = doc.createElement("comment")
comment.textContent = entry.comment
head.appendChild(comment)
# now lets do body # now lets do body
body = doc.createElement("body") body = doc.createElement("body")