code: public static boolean hasChildren(final Element el) throws SAXException {
      NodeList children = el.getChildNodes();
  
      for (int i = 0; i < children.getLength(); i++) {
        Node curnode = children.item(i);
  
        short ntype =  curnode.getNodeType();
        if ((ntype != Node.TEXT_NODE) &&
            (ntype != Node.CDATA_SECTION_NODE) &&
            (ntype != Node.COMMENT_NODE)) {
          return true;
        }
      }
  
      return false;
    }
docs: See if this node has any children
  
  @param el
  @return boolean   true for any child elements
  @throws SAXException