def modifyElement(self): """Modify this element""" ele = self.doc.createElement('modify') if self.name == 'node': ele.appendChild(node2xml(self)) elif self.name == 'way': ele.appendChild(way2xml(self)) elif self.name == 'relation': ele.appendChild(relation2xml(self)) self.base.appendChild(ele)
def preDeleteElement(self): """Returns the string to delete the element. Please use with caution!""" ele = self.doc.createElement('delete') if self.name == 'node': ele.appendChild(node2xml(self)) elif self.name == 'way': ele.appendChild(way2xml(self)) elif self.name == 'relation': ele.appendChild(relation2xml(self)) return ele