def get_sted_info(outfile): f = AtomicFileWriter(outfile, 'w') f.write(xml.xml_hdr + "<data>\n") steder = LT.GetSteder() for s in steder: column_names = LT.get_column_names(s) f.write(xml.xmlify_dbrow(s, xml.conv_colnames(column_names), 'sted', 0) + "\n") komm = LT.GetStedKomm(s['fakultetnr'], s['instituttnr'], s['gruppenr']) for k in komm: column_names2 = LT.get_column_names(k) f.write(xml.xmlify_dbrow(k, xml.conv_colnames(column_names2), 'komm') + "\n") # od f.write("</sted>\n") # od f.write("</data>\n") f.close()