Android Utililty Methods XmlPullParser Skip

List of utility methods to do XmlPullParser Skip

Description

The list of methods to do XmlPullParser Skip are organized into topic(s).

Method

voidskipExit(final XmlPullParser pp)
skip Exit
skipToEnd(pp);
if (pp.getEventType() != XmlPullParser.END_TAG)
    throw new IllegalStateException("expecting end tag to exit");
pp.next();
voidskipExit(final XmlPullParser pp, final String tagName)
skip Exit
skipToEnd(pp);
pp.require(XmlPullParser.END_TAG, null, tagName);
pp.next();
voidskipSubTree(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;
...
voidskipSubTree(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;
...
voidskipSubTree(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;
...
voidskipTag(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(
...
voidskipWhitespace(final XmlPullParser pp)
skip Whitespace
if (pp.getEventType() == XmlPullParser.START_DOCUMENT)
    pp.next();
if (pp.getEventType() == XmlPullParser.TEXT && pp.isWhitespace())
    pp.next();
voidrequireSkip(final XmlPullParser pp, final String tagName)
require Skip
require(pp, tagName);
if (!pp.isEmptyElementTag()) {
    enter(pp, tagName);
    skipExit(pp, tagName);
} else {
    next(pp);