(I'm sorry that I couldn't commit it earlier, but I didn't have access to an
internet connection until now.)
doc = p.parse
doc.find('//osm/relation').each do |pt|
- relation = Relation.from_xml_node pt, create
+ return Relation.from_xml_node(pt, create)
end
rescue
- relation = nil
+ return nil
end
-
- return relation
end
def self.from_xml_node(pt, create=false)
doc = p.parse
doc.find('//osm/way').each do |pt|
- way = Way.from_xml_node pt, create
+ return Way.from_xml_node(pt, create)
end
rescue
- way = nil
+ return nil
end
-
- return way
end
def self.from_xml_node(pt, create=false)