+ # delete doesn't have to contain a full payload, according to
+ # the wiki docs, so we just extract the things we need.
+ new_id = xml['id'].to_i
+ raise API::APIBadXMLError.new(model, xml, "ID attribute is required") if new_id.nil?
+
+ # if the ID is a placeholder then map it to the real ID
+ model_sym = model.to_s.downcase.to_sym
+ is_placeholder = ids[model_sym].include? new_id
+ id = is_placeholder ? ids[model_sym][new_id] : new_id
+
+ # build the "new" element by modifying the existing one
+ new = model.find(id)
+ new.changeset_id = xml['changeset'].to_i
+ new.version = xml['version'].to_i