Pull XML serialization out into a separate mixin [PLAT-229]