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

Method nextImpl

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

common base for next and nextToken. Clears the state, except from txtPos and whitespace. Does not set the type variable

()

Source from the content-addressed store, hash-verified

249 * txtPos and whitespace. Does not set the type variable */
250
251 private final void nextImpl() throws IOException, XmlPullParserException {
252
253 if (reader == null)
254 exception("No Input specified");
255
256 if (type == END_TAG)
257 depth--;
258
259 while (true) {
260 attributeCount = -1;
261
262 // degenerated needs to be handled before error because of possible
263 // processor expectations(!)
264
265 if (degenerated) {
266 degenerated = false;
267 type = END_TAG;
268 return;
269 }
270
271
272 if (error != null) {
273 for (int i = 0; i < error.length(); i++)
274 push(error.charAt(i));
275 // text = error;
276 error = null;
277 type = COMMENT;
278 return;
279 }
280
281
282 if (relaxed
283 && (stackMismatch > 0 || (peek(0) == -1 && depth > 0))) {
284 int sp = (depth - 1) << 2;
285 type = END_TAG;
286 namespace = elementStack[sp];
287 prefix = elementStack[sp + 1];
288 name = elementStack[sp + 2];
289 if (stackMismatch != 1)
290 error = "missing end tag /" + name + " inserted";
291 if (stackMismatch > 0)
292 stackMismatch--;
293 return;
294 }
295
296 prefix = null;
297 name = null;
298 namespace = null;
299 // text = null;
300
301 type = peekType();
302
303 switch (type) {
304
305 case ENTITY_REF :
306 pushEntity();
307 return;
308

Callers 2

nextMethod · 0.95
nextTokenMethod · 0.95

Calls 10

exceptionMethod · 0.95
pushMethod · 0.95
peekMethod · 0.95
peekTypeMethod · 0.95
pushEntityMethod · 0.95
parseStartTagMethod · 0.95
parseEndTagMethod · 0.95
pushTextMethod · 0.95
parseLegacyMethod · 0.95
lengthMethod · 0.80

Tested by

no test coverage detected