*/
private ReportSet parseReportSet( XmlPullParser parser, boolean strict, InputSource source )
throws IOException, XmlPullParserException
{
String tagName = parser.getName();
ReportSet reportSet = new ReportSet();
InputLocation _location;
_location = new InputLocation( parser.getLineNumber(), parser.getColumnNumber(), source );
reportSet.setLocation( "", _location );
for ( int i = parser.getAttributeCount() - 1; i >= 0; i-- )
{
String name = parser.getAttributeName( i );
String value = parser.getAttributeValue( i );
if ( name.indexOf( ':' ) >= 0 )
{
// just ignore attributes with non-default namespace (for example: xmlns:xsi)
}
else
{
checkUnknownAttribute( parser, name, tagName, strict );
}
}
java.util.Set parsed = new java.util.HashSet();
while ( ( strict ? parser.nextTag() : nextTag( parser ) ) == XmlPullParser.START_TAG )
{
if ( checkFieldWithDuplicate( parser, "id", null, parsed ) )
{
_location = new InputLocation( parser.getLineNumber(), parser.getColumnNumber(), source );
reportSet.setLocation( "id", _location );
reportSet.setId( getTrimmedValue( parser.nextText() ) );
}
else if ( checkFieldWithDuplicate( parser, "reports", null, parsed ) )
{
java.util.List reports = new java.util.ArrayList/*<String>*/();
reportSet.setReports( reports );
InputLocation _locations;
_locations = new InputLocation( parser.getLineNumber(), parser.getColumnNumber(), source );
reportSet.setLocation( "reports", _locations );
while ( parser.nextTag() == XmlPullParser.START_TAG )
{
if ( "report".equals( parser.getName() ) )
{
_location = new InputLocation( parser.getLineNumber(), parser.getColumnNumber(), source );
_locations.setLocation( Integer.valueOf( reports.size() ), _location );
reports.add( getTrimmedValue( parser.nextText() ) );
}
else
{
checkUnknownElement( parser, strict );
}
}
}
else if ( checkFieldWithDuplicate( parser, "inherited", null, parsed ) )
{
_location = new InputLocation( parser.getLineNumber(), parser.getColumnNumber(), source );
reportSet.setLocation( "inherited", _location );
reportSet.setInherited( getTrimmedValue( parser.nextText() ) );
}
else if ( checkFieldWithDuplicate( parser, "configuration", null, parsed ) )
{
_location = new InputLocation( parser.getLineNumber(), parser.getColumnNumber(), source );
reportSet.setLocation( "configuration", _location );
reportSet.setConfiguration( Xpp3DomBuilder.build( parser ) );
}
else
{
checkUnknownElement( parser, strict );
}