def parseXML(self, xmldata): print "parsing xmldata with length", len(xmldata) xmldoc = xml_dom_minidom_parseString(xmldata); blist = xmldoc.getElementsByTagName("e2bouquetlist")[0] print "Num TV Bouquets", len(blist.getElementsByTagName('e2tvbouquetlist')[0].getElementsByTagName('e2bouquet')) print "Num RADIO Bouquets", len(blist.getElementsByTagName('e2radiobouquetlist')[0].getElementsByTagName('e2bouquet')) bouquets_tv = self.parseBouquets(blist.getElementsByTagName('e2tvbouquetlist')[0]) bouquets_radio = self.parseBouquets(blist.getElementsByTagName('e2radiobouquetlist')[0]) return bouquets_tv, bouquets_radio
def parseXML(self, xmldata): print "parsing xmldata with length", len(xmldata) xmldoc = xml_dom_minidom_parseString(xmldata); blist = xmldoc.getElementsByTagName("e2bouquetlist")[0] print "Num TV Bouquets", len(blist.getElementsByTagName('e2tvbouquetlist')[0].getElementsByTagName('e2bouquet')) print "Num RADIO Bouquets", len(blist.getElementsByTagName('e2radiobouquetlist')[0].getElementsByTagName('e2bouquet')) bouquets_tv = self.parseBouquets(blist.getElementsByTagName('e2tvbouquetlist')[0]) bouquets_radio = self.parseBouquets(blist.getElementsByTagName('e2radiobouquetlist')[0]) return bouquets_tv, bouquets_radio