code: private String getElementText(Element element) {
          Node node = element.getFirstChild();
          if (node == null || node.getNodeType() != Node.TEXT_NODE) {
              return null;
          }
          return node.getNodeValue().trim();
      }
docs: Read begin tag, text, end tag.
  
  @param name
  
  @return The trimmed text content or null.