code: private void getTextContent(StringBuilder sb) throws DOMException {
          NodeList children = getChildNodes();
          for (int i = 0; i < children.getLength(); i++) {
              Node child = children.item(i);
              if (hasTextContent(child)) {
                  sb.append(child.getTextContent());
              }
          }
      }
docs: internal method taking a StringBuffer in parameter