* @param parser
*/
private FileSet parseFileSet(String tagName, XmlPullParser parser, boolean strict, String encoding)
throws IOException, XmlPullParserException
{
FileSet fileSet = new FileSet();
fileSet.setModelEncoding( encoding );
java.util.Set parsed = new java.util.HashSet();
while ( parser.nextTag() == XmlPullParser.START_TAG )
{
if ( parser.getName().equals( "directory" ) )
{
if ( parsed.contains( "directory" ) )
{
throw new XmlPullParserException( "Duplicated tag: '" + parser.getName() + "'", parser, null);
}
parsed.add( "directory" );
fileSet.setDirectory( getTrimmedValue( parser.nextText()) );
}
else if ( parser.getName().equals( "includes" ) )
{
if ( parsed.contains( "includes" ) )
{
throw new XmlPullParserException( "Duplicated tag: '" + parser.getName() + "'", parser, null);
}
parsed.add( "includes" );
java.util.List includes = new java.util.ArrayList();
fileSet.setIncludes( includes );
while ( parser.nextTag() == XmlPullParser.START_TAG )
{
if ( parser.getName().equals( "include" ) )
{
includes.add( getTrimmedValue( parser.nextText()) );
}
else
{
parser.nextText();
}
}
}
else if ( parser.getName().equals( "excludes" ) )
{
if ( parsed.contains( "excludes" ) )
{
throw new XmlPullParserException( "Duplicated tag: '" + parser.getName() + "'", parser, null);
}
parsed.add( "excludes" );
java.util.List excludes = new java.util.ArrayList();
fileSet.setExcludes( excludes );
while ( parser.nextTag() == XmlPullParser.START_TAG )
{
if ( parser.getName().equals( "exclude" ) )
{
excludes.add( getTrimmedValue( parser.nextText()) );