List of utility methods to do XML Element Child Check
boolean | hasChildElements(Element element) Indicates whether element has any child element. NodeList childNodes = element.getChildNodes(); for (int i = 0; i < childNodes.getLength(); i++) { Node node = childNodes.item(i); if (node.getNodeType() == Node.ELEMENT_NODE) { return true; return false; ... |
boolean | hasChildren(Element e) has Children if (e == null) return false; return e.getFirstChild() != null; |