question: public static boolean hasElementChild ( Node node ) { NodeList nl = node . getChildNodes ( ) ; Node child = null ; int length = nl . getLength ( ) ; for ( int i = 0 ; i < length ; i ++ ) { child = nl . item ( i ) ; if ( child . getNodeType ( ) == Node . ELEMENT_NODE ) { return true ; } } return false ; }
target:  Checks if a node has a child of ELEMENT type.