Replace XML serializer in plaintext export

Fixes #342
Alternative to #929

Preserves all emojis :-)
might be a bit cleaner to create a helper function like appendAttribute(builder, key, value) to avoid the repetition of OPEN_ATTRIBUTE and CLOSE_ATTRIBUTE appending