def GetText(node):

  """Dig out node text

  Args:
    node: DOM node

  Returns:
    text: stripped concatenation of all TEXT_NODEs
  """

  if not node:
    return None
  text = []
  for child in node.childNodes:
    if child.nodeType == child.TEXT_NODE:
      text.append(child.data)
    elif child.nodeType == child.CDATA_SECTION_NODE:
      text.append(child.wholeText)
  return "".join(text).strip()