private static PbDocument [ ] getPbDocs ( final NodeList nl ) { List list = new ArrayList ( ) ; Element prevpb = null ; for ( int i = 0 ; i < nl . getLength ( ) ; i ++ ) { Element pb = ( Element ) nl . item ( i ) ; PbDocument pbdoc = new PbDocument ( prevpb , pb ) ; list . add ( pbdoc ) ; prevpb = pb ; if ( i == ( nl . getLength ( ) - 1 ) ) { pbdoc = new PbDocument ( pb , null ) ; list . add ( pbdoc ) ; } // end if } // end for PbDocument array [ ] = new PbDocument [ list . size ( ) ] ; for ( int i = 0 ; i < list . size ( ) ; i ++ ) { array [ i ] = ( PbDocument ) list . get ( i ) ; } // end for return array ; }
Return the pagebreaks