public static List getChildTextList ( Element elem , String childTagName ) { NodeList nodeList = elem . getElementsByTagName ( childTagName ) ; int len = nodeList . getLength ( ) ; if ( len == 0 ) { return Collections . EMPTY_LIST ; } List list = new ArrayList ( len ) ; for ( int i = 0 ; i < len ; i ++ ) { list . add ( getElementText ( ( Element ) nodeList . item ( i ) ) ) ; } return list ; }
Return list of content Strings of all child elements with given tag name .