serialization and deserialization to xml