private static void processSeasonEpisodes ( Element eEpisodeList , EpisodeList epList ) { // Get the season number String season = eEpisodeList . getAttribute ( "no" ) ; NodeList nlEpisode = eEpisodeList . getElementsByTagName ( EPISODE ) ; if ( nlEpisode == null || nlEpisode . getLength ( ) == 0 ) { return ; } for ( int eLoop = 0 ; eLoop < nlEpisode . getLength ( ) ; eLoop ++ ) { Node nEpisode = nlEpisode . item ( eLoop ) ; if ( nEpisode . getNodeType ( ) == Node . ELEMENT_NODE ) { epList . addEpisode ( parseEpisode ( ( Element ) nEpisode , season ) ) ; } } }
Process the episodes in the season and add them to the EpisodeList