simplify grabbing of a xml base doc
This commit is contained in:
parent
2f55a3f0a8
commit
668f8020cc
13 changed files with 45 additions and 46 deletions
|
@ -45,15 +45,8 @@ class Way < ActiveRecord::Base
|
|||
end
|
||||
|
||||
def to_xml
|
||||
doc = XML::Document.new
|
||||
doc.encoding = 'UTF-8'
|
||||
root = XML::Node.new 'osm'
|
||||
root['version'] = '0.4'
|
||||
root['generator'] = 'OpenStreetMap server'
|
||||
|
||||
doc.root = root
|
||||
|
||||
root << to_xml_node()
|
||||
doc = OSM::API.new.get_xml_doc
|
||||
doc.root << to_xml_node()
|
||||
return doc
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue