serialise/deserialise XML payload