def handleTok(tokenlist):
    texts = ''
for token in tokenlist:
    texts += ' ' + getText(token.childNodes)
return texts
foo = dom.getElementsByTagName('foo')
text = handleTok(foo)
print(text)
Getting text between xml tags with minidom