while (true) {  parseCharData ();   c = readCh (); switch (c) {  case '&': c = readCh (); if (c == '#') { parseCharRef (); } else { unread (c); parseEntityRef (true); } isDirtyCurrentElement = true; break;  case '<': dataBufferFlush (); c = readCh (); switch (c) { case '!': c = readCh (); switch (c) { case '-': require ('-'); isDirtyCurrentElement = false; parseComment (); break; case '[': isDirtyCurrentElement = false; require ("CDATA["); handler.startCDATA (); inCDATA = true; parseCDSect (); inCDATA = false; handler.endCDATA (); break; default: error ("expected comment or CDATA section", c, null); break; } break;  case '?': isDirtyCurrentElement = false; parsePI (); break;  case '/': isDirtyCurrentElement = false; parseETag (); return;  default: isDirtyCurrentElement = false; unread (c); parseElement (false); break; } } }  }
c = readCh(); switch (c) { case '&': c = readCh(); if (c == '#') { parseCharRef(); } else { unread(c); parseEntityRef(true); } isDirtyCurrentElement = true; break;  case '<': dataBufferFlush(); c = readCh(); switch (c) { case '!': c = readCh(); switch (c) { case '-': require('-'); isDirtyCurrentElement = false; parseComment(); break; case '[': isDirtyCurrentElement = false; require("CDATA["); handler.startCDATA(); inCDATA = true; parseCDSect(); inCDATA = false; handler.endCDATA(); break; default: error("expected comment or CDATA section", c, null); break; } break;  case '?': isDirtyCurrentElement = false; parsePI(); break;  case '/': isDirtyCurrentElement = false; parseETag(); return;  default: isDirtyCurrentElement = false; unread(c); parseElement(false); break; } } } }
    private void parseContent ()    throws Exception    {	char c;	while (true) {	    // consume characters (or ignorable whitspace) until delimiter	    parseCharData ();	    // Handle delimiters	    c = readCh ();	    switch (c) {	    case '&': 			// Found "&"		c = readCh ();		if (c == '#') {		    parseCharRef ();		} else {		    unread (c);		    parseEntityRef (true);		}		isDirtyCurrentElement = true;		break;	      case '<': 			// Found "<"		dataBufferFlush ();		c = readCh ();		switch (c) {		  case '!': 			// Found "<!"		    c = readCh ();		    switch (c) {		      case '-': 		// Found "<!-"			require ('-');			isDirtyCurrentElement = false;			parseComment ();			break;		      case '[': 		// Found "<!["		      	isDirtyCurrentElement = false;			require ("CDATA[");			handler.startCDATA ();			inCDATA = true;			parseCDSect ();			inCDATA = false;			handler.endCDATA ();			break;		      default:			error ("expected comment or CDATA section", c, null);	                break;		    }		    break;		  case '?': 		// Found "<?"		    isDirtyCurrentElement = false;		    parsePI ();		    break;		  case '/': 		// Found "</"		    isDirtyCurrentElement = false;		    parseETag ();		    return;		  default: 		// Found "<" followed by something else		    isDirtyCurrentElement = false;		    unread (c);		    parseElement (false);		    break;		}	    }	}	    }