Here you can find the source of nextStartTag(XmlPullParser pp)
public static void nextStartTag(XmlPullParser pp) throws XmlPullParserException, IOException
//package com.java2s; // for license please see accompanying LICENSE.txt file (available also at http://www.xmlpull.org/) import java.io.IOException; import org.xmlpull.v1.XmlPullParser; import org.xmlpull.v1.XmlPullParserException; public class Main { /**//from ww w . j av a 2 s. c om * 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); } }