Электронный магазин на Java и XML

         

Метод doPost, продолжение (Interpreter.java)



Листинг 7.17. Метод doPost, продолжение (Interpreter.java)

String branch = branchLookUp( oplist, optS );
if( branch != null ){ //System.out.println("Taking Branch:" + branch );
setBranch( branch );
// sets nowBlock and nowNode to new value if( nowNode == null ) genTerminal( out, recordB );
else genQuest( out );
return ; } // branch is null, nowBlock has 1 or more <Ques NodeList qlist = ((Element)nowBlock).getElementsByTagName("Ques");
int n = 0 ; int nct = qlist.getLength();
while( qlist.item(n) != nowNode && n < nct ) n++ ; // n = nowNode Node nxtN = qlist.item(n+1);
if( nxtN != null ){ nowNode = nxtN ; genQuest( out );
System.out.println("Found nextQ");
return ; } if( terminal ) genTerminal( out, recordB );
else out.println("nextQ NULL, not terminal<br>
" );
} // end doPostQ



Содержание раздела