Added implementation of the XML serialization case. Not tested yet.