Here you can find the source of readInteger(XmlPullParser parser, String ns, String tag)
public static int readInteger(XmlPullParser parser, String ns, String tag) throws IOException, XmlPullParserException
//package com.java2s; //License from project: Open Source License import java.io.IOException; import org.xmlpull.v1.XmlPullParser; import org.xmlpull.v1.XmlPullParserException; public class Main { public static int readInteger(XmlPullParser parser, String ns, String tag) throws IOException, XmlPullParserException { parser.require(XmlPullParser.START_TAG, ns, tag); int integer = readInt(parser); parser.require(XmlPullParser.END_TAG, ns, tag); return integer; }/* w w w. j av a2s.c om*/ public static int readInt(XmlPullParser parser) throws IOException, XmlPullParserException { String result = ""; if (parser.next() == XmlPullParser.TEXT) { result = parser.getText(); parser.nextTag(); } return Integer.parseInt(result); } }