nl: call the method self.xml.startElement with 2 arguments: string 'field' and dictionary containing 3 entries: field.name for 'name',
code: self . xml . startElement ( "field" , { "name" : field . name , "rel" : field . rel . __class__ . __name__ , "to" : smart_text ( field . rel . to . _meta ) , } )