code: def getXmlText (parent, tag):
      
      elem = parent.getElementsByTagName(tag)[0]
      # Yes, the DOM standard is awful.
      rc = []
      for node in elem.childNodes:
          if node.nodeType == node.TEXT_NODE:
              rc.append(node.data)
      return ''.join(rc)
docs: Return XML content of given tag in parent element.