Android XmlPullParser Move to Next nextDirectChildTag( XmlPullParser paramXmlPullParser, int paramInt)

Here you can find the source of nextDirectChildTag( XmlPullParser paramXmlPullParser, int paramInt)

Description

next Direct Child Tag

Declaration

public static String nextDirectChildTag(
            XmlPullParser paramXmlPullParser, int paramInt)
            throws XmlPullParserException, IOException 

Method Source Code

//package com.java2s;
import java.io.IOException;
import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserException;

public class Main {
    public static String nextDirectChildTag(
            XmlPullParser paramXmlPullParser, int paramInt)
            throws XmlPullParserException, IOException {
        int i = paramInt + 1;
        for (int j = paramXmlPullParser.next(); j != 1; j = paramXmlPullParser
                .next()) {/*from   ww  w  . jav a  2 s . co m*/
            int k = paramXmlPullParser.getDepth();
            if ((j == 2) && (k == i))
                return paramXmlPullParser.getName();
            if ((j == 3) && (k == paramInt))
                return null;
        }
        throw new XmlPullParserException(
                "End of document reached; never saw expected end tag at depth "
                        + paramInt);
    }
}

Related

  1. moveToElement(XmlPullParser parser, String namespaceName, String name)
  2. next(final XmlPullParser pp)
  3. nextDateTime(XmlPullParser parser, String tag)
  4. nextDouble(XmlPullParser parser, String tag)
  5. nextElement(XmlPullParser parser)
  6. nextElement(XmlPullParser parser)
  7. nextElement(XmlPullParser parser)