Automatic marshaling and unmarshaling of objects to XML