{
xpp.next();
}
catch ( IOException e )
{
throw new XmlPullParserException( I18n.err( I18n.ERR_03037, e.getLocalizedMessage() ), xpp, null );
}
eventType = xpp.getEventType();
}
if ( eventType == XmlPullParser.START_DOCUMENT )
{
container.setState( Dsmlv2StatesEnum.INIT_GRAMMAR_STATE );
}
else if ( eventType == XmlPullParser.END_DOCUMENT )
{
container.setState( Dsmlv2StatesEnum.GRAMMAR_END );
return null;
}
else if ( eventType == XmlPullParser.START_TAG )
{
processTag( container, Tag.START );
}
else if ( eventType == XmlPullParser.END_TAG )
{
processTag( container, Tag.END );
}
try
{
eventType = xpp.next();
}
catch ( IOException e )
{
throw new XmlPullParserException( I18n.err( I18n.ERR_03037, e.getLocalizedMessage() ), xpp, null );
}
}
while ( container.getState() != Dsmlv2StatesEnum.BATCHREQUEST_LOOP );
return container.getBatchRequest().getCurrentRequest();