Android XmlPullParser Value Get extractFirstChildTextIgnoreRest( XmlPullParser paramXmlPullParser)

Here you can find the source of extractFirstChildTextIgnoreRest( XmlPullParser paramXmlPullParser)

Description

extract First Child Text Ignore Rest

Declaration

public static String extractFirstChildTextIgnoreRest(
            XmlPullParser paramXmlPullParser)
            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 extractFirstChildTextIgnoreRest(
            XmlPullParser paramXmlPullParser)
            throws XmlPullParserException, IOException {
        int i = paramXmlPullParser.getDepth();
        int j = paramXmlPullParser.next();
        String str = null;/*from ww  w  .  j ava2  s. c om*/
        if (j != 1) {
            int k = paramXmlPullParser.getDepth();
            if (j == 4)
                if (str == null)
                    str = paramXmlPullParser.getText();
            while ((j != 3) || (k != i)) {
                j = paramXmlPullParser.next();
                break;
            }
            return str;
        }
        throw new XmlPullParserException(
                "End of document reached; never saw expected end tag at depth "
                        + i);
    }
}

Related

  1. loadFloatByParser(XmlPullParser parser)
  2. loadIntArrayByParser(XmlPullParser parser)
  3. loadStringArrayByParser(XmlPullParser parser)
  4. GetFullName(XmlPullParser reader)
  5. extractChildText(XmlPullParser paramXmlPullParser)
  6. optAttr(final XmlPullParser pp, final String attrName, final String defaultValue)
  7. optFloatAttr(final XmlPullParser pp, final String attrName, final float defaultValue)
  8. optIntAttr(final XmlPullParser pp, final String attrName, final int defaultValue)
  9. optSkip(final XmlPullParser pp, final String tagName)