+ fail OSM::APIBadXMLError.new("relation", pt, "Version is required when updating") unless create || !pt["version"].nil?
+ relation.version = pt["version"]
+ fail OSM::APIBadXMLError.new("relation", pt, "Changeset id is missing") if pt["changeset"].nil?
+ relation.changeset_id = pt["changeset"]
+
+ unless create
+ fail OSM::APIBadXMLError.new("relation", pt, "ID is required when updating") if pt["id"].nil?
+ relation.id = pt["id"].to_i
+ # .to_i will return 0 if there is no number that can be parsed.
+ # We want to make sure that there is no id with zero anyway
+ fail OSM::APIBadUserInput.new("ID of relation cannot be zero when updating.") if relation.id == 0