List of utility methods to do XmlPullParser Move to Next
void | nextStartTag(XmlPullParser pp) call parser nextTag() and check that it is START_TAG, throw exception if not. if (pp.nextTag() != XmlPullParser.START_TAG) { throw new XmlPullParserException("expected START_TAG and not " + pp.getPositionDescription()); |
void | nextStartTag(XmlPullParser pp, String name) combine nextTag(); pp.require(XmlPullParser.START_TAG, null, name); pp.nextTag(); pp.require(XmlPullParser.START_TAG, null, name); |
void | nextStartTag(XmlPullParser pp, String name) combine nextTag(); pp.require(XmlPullParser.START_TAG, null, name); pp.nextTag(); pp.require(XmlPullParser.START_TAG, null, name); |
void | nextStartTag(XmlPullParser pp, String namespace, String name) combine nextTag(); pp.require(XmlPullParser.START_TAG, namespace, name); pp.nextTag(); pp.require(XmlPullParser.START_TAG, namespace, name); |
void | nextStartTag(XmlPullParser pp, String namespace, String name) combine nextTag(); pp.require(XmlPullParser.START_TAG, namespace, name); pp.nextTag(); pp.require(XmlPullParser.START_TAG, namespace, name); |
String | nextString(XmlPullParser parser, String tag) next String parser.require(XmlPullParser.START_TAG, null, tag);
String value = readText(parser);
parser.require(XmlPullParser.END_TAG, null, tag);
return value;
|
String | nextText(XmlPullParser pp, String namespace, String name) Read text content of element ith given namespace and name (use null namespace do indicate that nemspace should not be checked) if (name == null) { throw new XmlPullParserException( "name for element can not be null"); pp.require(XmlPullParser.START_TAG, namespace, name); return pp.nextText(); |
String | nextText(XmlPullParser pp, String namespace, String name) Read text content of element ith given namespace and name (use null namespace do indicate that nemspace should not be checked) if (name == null) { throw new XmlPullParserException( "name for element can not be null"); pp.require(XmlPullParser.START_TAG, namespace, name); return pp.nextText(); |
int | safeNext(XmlPullParser parser) safe Next try { parser.next(); while (null == parser.getName()) { parser.next(); return parser.getEventType(); } catch (XmlPullParserException e) { e.printStackTrace(); ... |
void | enter(final XmlPullParser pp) enter skipWhitespace(pp); if (pp.getEventType() != XmlPullParser.START_TAG) throw new IllegalStateException("expecting start tag to enter"); if (pp.isEmptyElementTag()) throw new IllegalStateException("cannot enter empty tag"); pp.next(); |