simplify grabbing of a xml base doc

This commit is contained in:
Steve Coast 2007-04-07 12:43:48 +00:00
parent 2f55a3f0a8
commit 668f8020cc
13 changed files with 45 additions and 46 deletions

View file

@ -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