Android XmlPullParser Move to Next nextText(XmlPullParser pp, String namespace, String name)

Here you can find the source of nextText(XmlPullParser pp, String namespace, String name)

Description

Read text content of element ith given namespace and name (use null namespace do indicate that nemspace should not be checked)

Declaration


public static String nextText(XmlPullParser pp, String namespace,
        String name) throws IOException, XmlPullParserException 

Method Source Code

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

public class Main {
    /**/*from www  .ja  va 2 s . c  om*/
     * Read text content of element ith given namespace and name
     * (use null namespace do indicate that nemspace should not be checked)
     */

    public static String nextText(XmlPullParser pp, String namespace,
            String name) throws IOException, XmlPullParserException {
        if (name == null) {
            throw new XmlPullParserException(
                    "name for element can not be null");
        }
        pp.require(XmlPullParser.START_TAG, namespace, name);
        return pp.nextText();
    }
}

Related

  1. nextStartTag(XmlPullParser pp, String name)
  2. nextStartTag(XmlPullParser pp, String name)
  3. nextStartTag(XmlPullParser pp, String namespace, String name)
  4. nextStartTag(XmlPullParser pp, String namespace, String name)
  5. nextString(XmlPullParser parser, String tag)
  6. nextText(XmlPullParser pp, String namespace, String name)
  7. safeNext(XmlPullParser parser)
  8. enter(final XmlPullParser pp)
  9. enter(final XmlPullParser pp, final String tagName)