Code example for XmlPullParser

Methods: getTextnextnextTag

        // For text tags, extracts their text values. 
        protected String readText(XmlPullParser parser) throws IOException, XmlPullParserException {
            String result = "";
            if ( == XmlPullParser.TEXT) {
                result = parser.getText();
            return result;
         * Skips tags the parser isn't interested in. Uses depth to handle 
         * nested tags. i.e., if the next tag after a START_TAG isn't a matching 
         * END_TAG, it keeps going until it finds the matching END_TAG (as 
         * indicated by the value of "depth" being 0). 
        protected void skip(XmlPullParser parser) throws XmlPullParserException, IOException {
            if (parser.getEventType() != XmlPullParser.START_TAG) {
Contextual code suggestions in your IDE  Get Codota for Java