Handle pre-defined entities in XML module.

The XML module now handles predefined entities. Special characters, such as " will now be transformed into their predefined entities, e.g. &quot;, when writing the XML file. Upon reading, predefined entities will be converted into special chacaters, so that the user always deals with a human readable string.