public static List < Element > getChildElements ( Element ele ) { Assert . notNull ( ele , "Element must not be null" ) ; NodeList nl = ele . getChildNodes ( ) ; List < Element > childEles = new ArrayList < Element > ( ) ; for ( int i = 0 ; i < nl . getLength ( ) ; i ++ ) { Node node = nl . item ( i ) ; if ( node instanceof Element ) { childEles . add ( ( Element ) node ) ; } } return childEles ; }
Retrieves all child elements of the given DOM element