Here you can find the source of nextStartTag(XmlPullParser pp, String name)
public static void nextStartTag(XmlPullParser pp, String name) throws XmlPullParserException, IOException
//package com.java2s; import java.io.IOException; import org.xmlpull.v1.XmlPullParser; import org.xmlpull.v1.XmlPullParserException; public class Main { /**/*from ww w . j a v a2s . com*/ * call parser nextTag() and check that it is START_TAG, throw exception if not. */ public static void nextStartTag(XmlPullParser pp) throws XmlPullParserException, IOException { if (pp.nextTag() != XmlPullParser.START_TAG) { throw new XmlPullParserException("expected START_TAG and not " + pp.getPositionDescription()); } } /** * combine nextTag(); pp.require(XmlPullParser.START_TAG, null, name); */ public static void nextStartTag(XmlPullParser pp, String name) throws XmlPullParserException, IOException { pp.nextTag(); pp.require(XmlPullParser.START_TAG, null, name); } /** * combine nextTag(); pp.require(XmlPullParser.START_TAG, namespace, name); */ public static void nextStartTag(XmlPullParser pp, String namespace, String name) throws XmlPullParserException, IOException { pp.nextTag(); pp.require(XmlPullParser.START_TAG, namespace, name); } }