question: public static List < String > localText ( Element self ) { List < String > result = new ArrayList < String > ( ) ; if ( self . getNodeType ( ) == Node . TEXT_NODE || self . getNodeType ( ) == Node . CDATA_SECTION_NODE ) { result . add ( self . getNodeValue ( ) ) ; } else if ( self . hasChildNodes ( ) ) { NodeList nodeList = self . getChildNodes ( ) ; for ( int i = 0 ; i < nodeList . getLength ( ) ; i ++ ) { Node item = nodeList . item ( i ) ; if ( item . getNodeType ( ) == Node . TEXT_NODE || item . getNodeType ( ) == Node . CDATA_SECTION_NODE ) { result . add ( item . getNodeValue ( ) ) ; } } } return result ; }
target:  Returns the list of any direct String nodes of this node.