def sina_xml_to_url_list(xml_data):
 rawurl = []
 dom = parseString(xml_data)
 for node in dom.getElementsByTagName('durl'):
  url = node.getElementsByTagName('url')[0]
  rawurl.append(url.childNodes[0].data)
 return rawurl

def sina_xml_to_url_list ( xml_data ) : rawurl = [ ] dom = parseString ( xml_data ) for node in dom . getElementsByTagName ( 'durl' ) : url = node . getElementsByTagName ( 'url' ) [ 0 ] rawurl . append ( url . childNodes [ 0 ] . data ) return rawurl
str->list convert xml to url list .