/** * Skip sub tree that is currently parser positioned on. <br> * NOTE: parser must be on START_TAG and when function returns parser will be positioned on corresponding END_TAG */ public void skipSubTree() throws XmlPullParserException, IOException { require( START_TAG, null, null ); int level = 1; while ( level > 0 ) { int eventType = next(); if ( eventType == END_TAG ) { --level; } else if ( eventType == START_TAG ) { ++level; } } }
public int nextTag() throws XmlPullParserException, IOException { next(); if ( eventType == TEXT && isWhitespace() ) { // skip whitespace next(); } if ( eventType != START_TAG && eventType != END_TAG ) { throw new XmlPullParserException( "expected START_TAG or END_TAG not " + TYPES[getEventType()], this, null ); } return eventType; }
/** * Skip sub tree that is currently porser positioned on. * <br>NOTE: parser must be on START_TAG and when funtion returns * parser will be positioned on corresponding END_TAG */ public void skipSubTree() throws XmlPullParserException, IOException { require(START_TAG, null, null); int level = 1; while(level > 0) { int eventType = next(); if(eventType == END_TAG) { --level; } else if(eventType == START_TAG) { ++level; } } }
public int nextTag() throws XmlPullParserException, IOException { next(); if(eventType == TEXT && isWhitespace()) { // skip whitespace next(); } if (eventType != START_TAG && eventType != END_TAG) { throw new XmlPullParserException("expected START_TAG or END_TAG not " +TYPES[ getEventType() ], this, null); } return eventType; }
final int depth = parser.getDepth(); while ( parser.next() != XmlPullParser.END_TAG || parser.getDepth() > depth )
final int depth = parser.getDepth(); while ( parser.next() != XmlPullParser.END_TAG || parser.getDepth() > depth )