Here you can find the source of MoveToContent(XmlPullParser parser)
public static int MoveToContent(XmlPullParser parser) throws XmlPullParserException, IOException
//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 MoveToContent(XmlPullParser parser) throws XmlPullParserException, IOException { if (parser == null) throw new NullPointerException(); while (parser.getEventType() == XmlPullParser.PROCESSING_INSTRUCTION || parser.getEventType() == XmlPullParser.DOCDECL || parser.getEventType() == XmlPullParser.IGNORABLE_WHITESPACE || parser.getEventType() == XmlPullParser.START_DOCUMENT) { if (!Read(parser)) { break; }/*from w ww .j a va 2 s .co m*/ } return parser.getEventType(); } public static boolean Read(XmlPullParser parser) throws XmlPullParserException, IOException { if (parser == null) throw new NullPointerException(); if (parser.getEventType() == XmlPullParser.END_DOCUMENT) return false; parser.nextToken(); return true; } }