Add XmlPullUtil.optSkipMultiple() and use it where possible.

This commit is contained in:
Andreas Schildbach 2016-11-20 16:33:01 +01:00
parent 30cc003038
commit 1587f7fa9f
2 changed files with 10 additions and 14 deletions

View file

@ -106,6 +106,12 @@ public final class XmlPullUtil {
requireSkip(pp, tagName);
}
public static void optSkipMultiple(final XmlPullParser pp, final String tagName)
throws XmlPullParserException, IOException {
while (test(pp, tagName))
requireSkip(pp, tagName);
}
public static void next(final XmlPullParser pp) throws XmlPullParserException, IOException {
skipSubTree(pp);
pp.next();