doc.find('//osm/relation').each do |pt|
return Relation.from_xml_node(pt, create)
end
+ raise OSM::APIBadXMLError.new("node", xml, "XML doesn't contain an osm/relation element.")
rescue LibXML::XML::Error, ArgumentError => ex
raise OSM::APIBadXMLError.new("relation", xml, ex.message)
end
relation.visible = true
pt.find('tag').each do |tag|
+ raise OSM::APIBadXMLError.new("relation", pt, "tag is missing key") if tag['k'].nil?
+ raise OSM::APIBadXMLError.new("relation", pt, "tag is missing value") if tag['v'].nil?
relation.add_tag_keyval(tag['k'], tag['v'])
end