def to_xml(self, xml_parent):
    link = SubElement(xml_parent, 'name')
    link.set('name', self.name)
    return link
def to_xml(self, xml_parent):
    link = SubElement(xml_parent, 'name')
    link.set('name', self.name)
    return link