/** * 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; } } }
/** * 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; } } }
boolean optional = false; parser.require( XmlPullParser.START_TAG, null, "requirement" );
throws Exception parser.require( XmlPullParser.START_TAG, null, null );
boolean optional = false; parser.require( XmlPullParser.START_TAG, null, "requirement" );
final ClassSpace space = registry.getSpace(); parser.require( XmlPullParser.START_TAG, null, "component" );
final ClassSpace space = registry.getSpace(); parser.require( XmlPullParser.START_TAG, null, "component" );
parser.require( XmlPullParser.START_TAG, null, null ); // this may be <component-set> or <plexus>
parser.require( XmlPullParser.START_TAG, null, null ); // this may be <component-set> or <plexus>