MCPcopy Create free account
hub / github.com/dumbledore/AlbiteREADER / parseDoctype

Method parseDoctype

src/org/kxml2/io/KXmlParser.java:472–507  ·  view source on GitHub ↗

precondition: &lt! consumed

(boolean push)

Source from the content-addressed store, hash-verified

470 /** precondition: &lt! consumed */
471
472 private final void parseDoctype(boolean push)
473 throws IOException, XmlPullParserException {
474
475 int nesting = 1;
476 boolean quoted = false;
477
478 // read();
479
480 while (true) {
481 int i = read();
482 switch (i) {
483
484 case -1 :
485 error(UNEXPECTED_EOF);
486 return;
487
488 case '\'' :
489 quoted = !quoted;
490 break;
491
492 case '<' :
493 if (!quoted)
494 nesting++;
495 break;
496
497 case '>' :
498 if (!quoted) {
499 if ((--nesting) == 0)
500 return;
501 }
502 break;
503 }
504 if (push)
505 push(i);
506 }
507 }
508
509 /* precondition: &lt;/ consumed */
510

Callers 1

parseLegacyMethod · 0.95

Calls 3

readMethod · 0.95
errorMethod · 0.95
pushMethod · 0.95

Tested by

no test coverage detected