@SuppressWarnings("fallthrough") private void parse() throws SAXException, IOException {
  init();
  try {
    mHandCont.setDocumentLocator(this);
    mHandCont.startDocument();
    if (mPh != PH_MISC_DTD) {
      mPh=PH_MISC_DTD;
    }
    int evt=EV_NULL;
    do {
      wsskip();
switch (evt=step()) {
case EV_ELM:
case EV_ELMS:
        mPh=PH_DOCELM;
      break;
case EV_COMM:
case EV_PI:
    break;
case EV_DTD:
  if (mPh >= PH_DTD_MISC) {
    panic(FAULT);
  }
mPh=PH_DTD_MISC;
break;
default :
panic(FAULT);
}
}
 while (mPh < PH_DOCELM);
do {
switch (evt) {
case EV_ELM:
case EV_ELMS:
if (mIsNSAware == true) {
mHandCont.startElement(mElm.value,mElm.name,"",mAttrs);
}
 else {
mHandCont.startElement("","",mElm.name,mAttrs);
}
if (evt == EV_ELMS) {
evt=step();
break;
}
case EV_ELME:
if (mIsNSAware == true) {
mHandCont.endElement(mElm.value,mElm.name,"");
}
 else {
mHandCont.endElement("","",mElm.name);
}
while (mPref.list == mElm) {
mHandCont.endPrefixMapping(mPref.name);
mPref=del(mPref);
}
mElm=del(mElm);
if (mElm == null) {
mPh=PH_DOCELM_MISC;
}
 else {
evt=step();
}
break;
case EV_TEXT:
case EV_WSPC:
case EV_CDAT:
case EV_COMM:
case EV_PI:
case EV_ENT:
evt=step();
break;
default :
panic(FAULT);
}
}
 while (mPh == PH_DOCELM);
do {
if (wsskip() == EOS) {
break;
}
switch (step()) {
case EV_COMM:
case EV_PI:
break;
default :
panic(FAULT);
}
}
 while (mPh == PH_DOCELM_MISC);
mPh=PH_AFTER_DOC;
}
 catch (SAXException saxe) {
throw saxe;
}
catch (IOException ioe) {
throw ioe;
}
catch (RuntimeException rte) {
throw rte;
}
catch (Exception e) {
panic(e.toString());
}
 finally {
mHandCont.endDocument();
cleanup();
}
}

@ SuppressWarnings ( "fallthrough" ) private void parse ( ) throws SAXException , IOException { init ( ) ; try { mHandCont . setDocumentLocator ( this ) ; mHandCont . startDocument ( ) ; if ( mPh != PH_MISC_DTD ) { mPh = PH_MISC_DTD ; } int evt = EV_NULL ; do { wsskip ( ) ; switch ( evt = step ( ) ) { case EV_ELM : case EV_ELMS : mPh = PH_DOCELM ; break ; case EV_COMM : case EV_PI : break ; case EV_DTD : if ( mPh >= PH_DTD_MISC ) { panic ( FAULT ) ; } mPh = PH_DTD_MISC ; break ; default : panic ( FAULT ) ; } } while ( mPh < PH_DOCELM ) ; do { switch ( evt ) { case EV_ELM : case EV_ELMS : if ( mIsNSAware == true ) { mHandCont . startElement ( mElm . value , mElm . name , "" , mAttrs ) ; } else { mHandCont . startElement ( "" , "" , mElm . name , mAttrs ) ; } if ( evt == EV_ELMS ) { evt = step ( ) ; break ; } case EV_ELME : if ( mIsNSAware == true ) { mHandCont . endElement ( mElm . value , mElm . name , "" ) ; } else { mHandCont . endElement ( "" , "" , mElm . name ) ; } while ( mPref . list == mElm ) { mHandCont . endPrefixMapping ( mPref . name ) ; mPref = del ( mPref ) ; } mElm = del ( mElm ) ; if ( mElm == null ) { mPh = PH_DOCELM_MISC ; } else { evt = step ( ) ; } break ; case EV_TEXT : case EV_WSPC : case EV_CDAT : case EV_COMM : case EV_PI : case EV_ENT : evt = step ( ) ; break ; default : panic ( FAULT ) ; } } while ( mPh == PH_DOCELM ) ; do { if ( wsskip ( ) == EOS ) { break ; } switch ( step ( ) ) { case EV_COMM : case EV_PI : break ; default : panic ( FAULT ) ; } } while ( mPh == PH_DOCELM_MISC ) ; mPh = PH_AFTER_DOC ; } catch ( SAXException saxe ) { throw saxe ; } catch ( IOException ioe ) { throw ioe ; } catch ( RuntimeException rte ) { throw rte ; } catch ( Exception e ) { panic ( e . toString ( ) ) ; } finally { mHandCont . endDocument ( ) ; cleanup ( ) ; } }
parse the xml document content using specified handlers and an input source .
