]> git.openstreetmap.org Git - rails.git/blobdiff - app/models/old_node.rb
api06: simplify exception handling and add exception handling to the diff
[rails.git] / app / models / old_node.rb
index 2f960d8866a3239066a14f1198ddac08a06646ff..a3650173a6e5dfdaf3146eefe41b2a3adb0514e3 100644 (file)
@@ -30,6 +30,12 @@ class OldNode < GeoRecord
     old_node.version = node.version
     return old_node
   end
     old_node.version = node.version
     return old_node
   end
+  
+  def to_xml
+    doc = OSM::API.new.get_xml_doc
+    doc.root << to_xml_node()
+    return doc
+  end
 
   def to_xml_node
     el1 = XML::Node.new 'node'
 
   def to_xml_node
     el1 = XML::Node.new 'node'
@@ -47,6 +53,7 @@ class OldNode < GeoRecord
 
     el1['visible'] = self.visible.to_s
     el1['timestamp'] = self.timestamp.xmlschema
 
     el1['visible'] = self.visible.to_s
     el1['timestamp'] = self.timestamp.xmlschema
+    el1['version'] = self.version.to_s
     return el1
   end
 
     return el1
   end