* @return ExpressionDocumentation
*/
private ExpressionDocumentation parseExpressionDocumentation( String tagName, XmlPullParser parser, boolean strict )
throws IOException, XmlPullParserException
{
ExpressionDocumentation expressionDocumentation = new ExpressionDocumentation();
java.util.Set parsed = new java.util.HashSet();
int eventType = parser.getEventType();
boolean foundRoot = false;
expressionDocumentation.setModelEncoding( parser.getInputEncoding() );
while ( eventType != XmlPullParser.END_DOCUMENT )
{
if ( eventType == XmlPullParser.START_TAG )
{
if ( parser.getName().equals( tagName ) )
{
foundRoot = true;
}
else if ( strict && ! foundRoot )
{
throw new XmlPullParserException( "Expected root element '" + tagName + "' but found '" + parser.getName() + "'", parser, null );
}
else if ( checkFieldWithDuplicate( parser, "expressions", null, parsed ) )
{
java.util.List expressions = new java.util.ArrayList/*<Expression>*/();
expressionDocumentation.setExpressions( expressions );
while ( parser.nextTag() == XmlPullParser.START_TAG )
{
if ( parser.getName().equals( "expression" ) )
{
expressions.add( parseExpression( "expression", parser, strict ) );