code: static String getElementText(Element element) {
          StringBuffer buf = new StringBuffer();
  
          NodeList children = element.getChildNodes();
          for (int i = 0; i < children.getLength(); i++) {
              Node node = children.item(i);
              if (node.getNodeType() == Node.TEXT_NODE ||
                      node.getNodeType() == Node.CDATA_SECTION_NODE) {
                  Text text = (Text) node;
                  buf.append(text.getData().trim());
              }
          }
  
          return buf.toString();
      }
docs: <p>Returns the text value of a child element. Returns
  <code>null</code> if there is no child element found.</p>
  
  @param element element
  @return text value