List of utility methods to do XmlPullParser Skip
void | skipExit(final XmlPullParser pp) skip Exit skipToEnd(pp); if (pp.getEventType() != XmlPullParser.END_TAG) throw new IllegalStateException("expecting end tag to exit"); pp.next(); |
void | skipExit(final XmlPullParser pp, final String tagName) skip Exit skipToEnd(pp); pp.require(XmlPullParser.END_TAG, null, tagName); pp.next(); |
void | skipSubTree(XmlPullParser pp) Skip sub tree that is currently porser positioned on. pp.require(XmlPullParser.START_TAG, null, null); int level = 1; while (level > 0) { int eventType = pp.next(); if (eventType == XmlPullParser.END_TAG) { --level; } else if (eventType == XmlPullParser.START_TAG) { ++level; ... |
void | skipSubTree(XmlPullParser pp) Skip sub tree that is currently porser positioned on. pp.require(XmlPullParser.START_TAG, null, null); int level = 1; while (level > 0) { int eventType = pp.next(); if (eventType == XmlPullParser.END_TAG) { --level; } else if (eventType == XmlPullParser.START_TAG) { ++level; ... |
void | skipSubTree(final XmlPullParser pp) Skip sub tree that is currently porser positioned on. pp.require(XmlPullParser.START_TAG, null, null); int level = 1; while (level > 0) { final int eventType = pp.next(); if (eventType == XmlPullParser.END_TAG) --level; else if (eventType == XmlPullParser.START_TAG) ++level; ... |
void | skipTag(XmlPullParser parser) skip Tag if (parser.getEventType() != XmlPullParser.START_TAG) { throw new IllegalStateException(); int depth = 1; while (depth != 0) { switch (parser.next()) { case XmlPullParser.END_DOCUMENT: throw new XmlPullParserException( ... |
void | skipWhitespace(final XmlPullParser pp) skip Whitespace if (pp.getEventType() == XmlPullParser.START_DOCUMENT) pp.next(); if (pp.getEventType() == XmlPullParser.TEXT && pp.isWhitespace()) pp.next(); |
void | requireSkip(final XmlPullParser pp, final String tagName) require Skip require(pp, tagName); if (!pp.isEmptyElementTag()) { enter(pp, tagName); skipExit(pp, tagName); } else { next(pp); |