strip empty elements if blank
When users fill out form fields in the various XML editors in morpho, we
sometimes create an empty element if they left the form field blank. We need to
systematically go through all ways of creating XML in morpho and be sure that
any XML produced strips out all empty elements before saving. This may in fact
make the documents invalid with respect to the DTDs, but it is the right thing
to do. If a document is invalid, we should have a mechanism for saving it
without its DOCTYPE (see related bug).